Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Should I use the trailing slash / for a 301 Directory rewrite?
Old 01-03-2010, 08:11 PM Should I use the trailing slash / for a 301 Directory rewrite?
Defies a Status

Posts: 1,606
Trades: 0
This is a re-write of a post that I posted on another site were I got no answer.

The site consists of a main directory and 11 sub-directories. I have at least 11 indexed pages that look like mysite.com/Directory/ , all the page names will change from .php to .html and about 5 pages had to be renamed for various reasons.

I will be using mod-rewrite to rewrite dynamic URLs to html.

Long story made short, I feel like I have to have a redirect for every existing page since every page is indexed and who knows what other links may be out there.

All the indexed pages for the directories are shown with the trailing / in the SEs but if I set the redirect with a trailing slash and there are some links out there that do not include it then Page not found will be shown.

OTOH, if I sent the redirect like mysite.com/Directory Apache will auto add the trailing slash. My very limited testing indicates that the new page loads either way when the trailing slash is not included in the redirect.

Thoughts? Comments? Suggestions?


Come on Chris, tripy and few others. I am counting on you here.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-04-2010, 08:34 AM Re: Should I use the trailing slash / for a 301 Directory rewrite?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
If you include it you will save the server a little bit of work where it has to redirect to a folder + default document after unsuccessfully looking for a file with no extension.

The trailing slash indicates a folder + default document straight away.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Should I use the trailing slash / for a 301 Directory rewrite?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23516 seconds with 12 queries