Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2010-08-14, 08:51 PM   #1
PhoneMistress
Operator! Give me the number for 911!
 
Join Date: Jun 2004
Location: Washington DC
Posts: 138
301 Redirects

I am having canonical issues on my site which is wreaking havoc with my Google rankings.

So, I doubled checked everything. Turns out the 301 redirect was not set. So far I resolved with my host the 301 redirect for the canonical issues but am having difficulty locating the proper 301 redirect code to

1. Redirect the index.html to the root; and
2. Redirect pages and directories not found on the domain to the root.

Anyone know the code or a good place to find it?

Thanks again.
__________________
Cheap Phone Sex with Cheryl
PhoneMistress is offline   Reply With Quote
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
Old 2010-08-16, 12:08 PM   #3
PhoneMistress
Operator! Give me the number for 911!
 
Join Date: Jun 2004
Location: Washington DC
Posts: 138
Thanks for the information. I used your suggestions and I think everything is generating the right code now. There was something hokey about the server settings which automatically sets the 404 pass as a 302 redirect which is not search engine friendly.

I hate for this to happen to someone else. To double check my codes I used Rank Page and I traced them using a tool from SEO Consultants.
__________________
Cheap Phone Sex with Cheryl
PhoneMistress is offline   Reply With Quote
Reply


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 03:08 PM.


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