-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing slash on URLs #170
Comments
I guess I can just turn --pretty=false But then I'm stuck with .html I'm confused why a trailing slash exists on Amazon S3, but not on localhost |
This is S3's behavior; it hits It should have no SEO effect, however. According to Google, at least:
|
Here is a (late) solution to the problem for apache users. Add the following lines to the .htaccess: DirectorySlash Off
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_FILENAME}/index.html -f
RewriteRule (.*) $1/index.html [L] |
digging up this thread the following snipper is not working for my apache 2. any idea how to fix this?
|
Does the snippet really not work? The messages in the GSC can also have other reasons. |
this .htaccess snippet does not seem to be working for me, when I type in the url
EDIT: wait a sec., I made a typo in the when I type in the url |
I have just tested this, but cannot confirm the behaviour. "DirectorySlash Off" also applies to subdirectories. Unless there are special instructions for this subdirectory from this or another .htaccess file. https://httpd.apache.org/docs/current/howto/htaccess.html#how What happens if you place an .htaccess file with the content:
in this subdirectory? |
Now it's working, I haven't change anything. I think I found the reason because of the structured directories and files, I had this:
then I changed to
and it works fine now for the intermediary folders thanks |
I just deployed a site to Amazon S3, however I noticed that all of the URLs end with a trailing slash like so:
On my local machine it does not have a trailing slash
Why is it doing this? Is there anyway to fix this behavior? I believe Amazon S3 is treating the jigsaw folders like directories and then just assuming index.html is the file. Need to fix for SEO. Any suggestions? Thanks.
The text was updated successfully, but these errors were encountered: