Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2010-08-15, 06:52 AM   #2
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Regarding redirecting index.html to the root, it'll be best to specify the page which will be the root index page instead of index.html or you could wind up creating the conditions for an endless loop that you don't want. For example...

redirect 301 /index.html http://www.yourdomain.com/index.php

I'm not sure how to redirect a page or directory that doesn't exist.
Usually that's the job of the 404* redirect, not done by a 301 permanent replacement directive. For example...

ErrorDocument 404 /index.php

Both of those lines go in your .htaccess file. Make sure there's one space where shown, and that you use either relative or complete urls as shown in each instance. I'm just assuming index.php is your new index page so use whatever is correct in your case, but make sure to use the complete url.

Added: If you watch your server's error log for specific pages that get handled with a 404 you can add those to your .htaccess file using 301s in order to capture the PR of those missing pages and pass it along to wherever you redirect via 301 (if you believe it works that way). You can ignore the misspelled urls which get 404s of course.
__________________
"If you're happy and you know it, think again." -- Guru Pitka

Last edited by Simon; 2010-08-15 at 07:06 AM.. Reason: forgot to mention looking at the error log
Simon is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT -4. The time now is 10:03 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc