Modded Xbox - Credit Cards - Cheap Moissanite Earrings - Bush Furniture - Loans

PDA

View Full Version : a 301 redirect/php question


disgust
Jul 3rd 2004, 8:39 am
I was just curious, is it possible to...

check if a page exists, and if it doesn't, have it 301 redirect to your home page?

it'd be an interesting way to gain a bit of PR, plus it'd redirect the "lost" visitor.

schlottke
Jul 3rd 2004, 8:46 am
create a 404 Error page for your entire server and have it be a 301 Redirect..

disgust
Jul 3rd 2004, 9:03 am
if it's a 404, though, doesn't the browser (and therefor google..) see that it's a 404 error and not a 301?

bhutz
Jul 3rd 2004, 4:50 pm
Hey I don't know if this exactly what you want but I have tried to find something that you can use in .htaccess

Found this...http://www.webmasterworld.com/forum21/1126-1-15.htm

Basically it suggests adding this to your .htaccess file found in the root of your site

Redirect 301 / http://www.blingtones.co.uk/index.php
Not entirely sure how this works because I had a go hoping that typing blingtones.co.uk would redirect to index.php which it did but for some reason forgot the stylesheet and also messed up the design of the page, hope no new visitors saw it :eek:

I also just found that I can use this in my .htaccess for 404 error redirects which is fairly useful

ErrorDocument 404 http://www.blingtones.co.uk

Try the 301 redirect and see how you get on ;)

Voyager
Jul 3rd 2004, 9:42 pm
it'd be an interesting way to gain a bit of PR...

This does not sound correct to me.

I changed my domain name in May and setup a 301 Redirect to forward users to the same page at the new domain.

PR or anchor text have not transferred to the new domain name.

I slid from approximately 4,800 unique visitors a day to about 750 unique visitors a day. :mad:

So... I don't think a 301 strategy will gain you a bit of PR.

Of course, I could be wrong. :D