Clean Urls [SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
-null-

Clean Urls [SOLVED]

Post by -null- »

I have the following code in my .htaccess file to make all urls end in a slash however google keeps warning me about the 301 redirect.

Code: Select all

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
Is there a way to rewrite the URL without the redirect.  I tried taking the R=301 out as I thought that would work however it doesn't seem to.
Last edited by -null- on Thu Aug 07, 2008 5:31 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Clean Urls

Post by Dr.CSS »

This / means it has more like it's a folder with something in it so google is looking for and not finding the folder, so why would you want all URLs to end like that, do you see any other site doing it?...
-null-

Re: Clean Urls

Post by -null- »

I'm pretty sure I've seen a few although can't think of any off the top of my head  ???

And really I just think having a trailing slash is tidier.
Pierre M.

Re: Clean Urls

Post by Pierre M. »

I don't understand why some people want trailing slashes. Why do they want leaves show as nodes ? Why don't they like /some/path/to/page.html ? I'm a last century web old timer, you know :-)

Pierre M.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Clean Urls

Post by Dr.CSS »

Having / at the end should make all browsers give an error 404 not found...
-null-

Re: Clean Urls

Post by -null- »

Why is it so bad to want trailing slashes  If the file has an extension (html,aspx,php) then I don't mind leaving it like that but generally with clean urls without an extension I prefer a slash

Anyway I've decided just to leave it as is.  Its not important just aesthetics.
Locked

Return to “CMSMS Core”