Again about trailing slash

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 14
Joined: 28 Nov 2012, 04:39

Again about trailing slash

22 May 2014, 15:16

Hi, Andrew, Anton!

I want to clarify the pattern to add trailing spaces:
1) the name of the site, ex site.com -> site.com/
2) the name of the directory at any nesting, ex site.com/news -> site.com/news/

I have(test) next rule
Code: Select all
#Fix missing trailing slash char on folders
RewriteRule ^([^.?]+[^.?/])$ $1/ [NC,R=301,L]


this rule work only for directories names ( /news -> /news/ or /market/goods -> /market/goods/)

Can you suggest a uniform rule for the site name and directory names?

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Again about trailing slash

22 May 2014, 22:11

Well...

I'd say to try this:

Code: Select all
#Fix missing trailing slash char on folders
RewriteRule ^([^.?]*[^.?/])$ $1/ [NC,R=301,L]


But this is really strange. I can't remember this affecting anything or being necessary for SEO, so why bother? ;)

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 12 guests