2
0
Fork 0
mirror of https://github.com/phanan/htaccess.git synced 2018-11-08 13:39:40 +01:00

Some minor rewording

This commit is contained in:
An Phan 2015-04-08 12:14:59 +08:00
parent e359543c9a
commit 38637cc493

View file

@ -122,9 +122,7 @@ RewriteRule ^(.*)/$ /$1 [R=301,L]
``` ```
### Remove Trailing Slash from Arbitrary Paths ### Remove Trailing Slash from Arbitrary Paths
This snippet will redirect paths ending in slashes to their non-slash-terminated counterparts (except for actual directories). This snippet will redirect paths ending in slashes to their non-slash-terminated counterparts (except for actual directories), e.g. `http://www.example.com/blog/` to `http://www.example.com/blog`. This is important for SEO, since it's [recommended](http://overit.com/blog/canonical-urls) to have a canonical URL for every page.
E.g., `http://www.example.com/blog/` -> `http://www.example.com/blog`
This is important for SEO, since it is [recommended to have a "canonical URL" for every page](http://overit.com/blog/canonical-urls).
``` apacheconf ``` apacheconf
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$ RewriteCond %{REQUEST_URI} (.+)/$