Forum Moderators: phranque

Message Too Old, No Replies

Force trailing slash

         

ballerslife

5:44 pm on Dec 17, 2009 (gmt 0)

10+ Year Member



Hi all,

Quick rewrite question here...

If you have a site full of pages in folders that are just the filenames, with no trailing slash and no extension.

e.g. widgets.com/blue/one widges.com/blue/two

and you would like every page without a trailing slash to rewrite to a page WITH a trailing slash

e.g. the above will be widgets.com/blue/one/ widgets.com/blue/two/

but they still read off the files (with no slashes). Is this possible?

so widgets.com/blue/one -> widgets.com/blue/one/ (but still reads off of the file named "one" in the folder "blue"

Thanks

jdMorgan

8:20 pm on Dec 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's possible -- and usually easy, but inefficient and not really advisable.

These are perfectly-acceptable 'extensionless URLs' and there's no good reason to link to them with trailing slashes. And what's a search engine to think of a site that appears to put only one page in each directory? -- They'll think you're wasting their time with all of those apparently-unnecessary directories!

I'd suggest you fix whatever basic problem is making you think you want to do this...

Jim