I'm attempting to 301 a directory on an old domain to a .html file on a new domain... I tried this in my .htaccess file, and it did not work: redirect 301 /olddir/ http://www.newdomain.com/newfile.html Any suggestions?
What error did you get ? What you wrote should redirect http://www.olddomain.com/olddir/ to http://www.newdomain.com/newfile.html. Note that it should not redirect http://www.olddomain.com/olddir (without the trailing slash). Jean-Luc
Thanks for the responses, but no luck... When I do the redirect the server directs the dir, but it ends up at the new domain with /olddir/ at the end... Any thoughts?
You could just create a index file in that directory that re-directs to that page, you can use the below php code to do this, just create index.php, insert the code and upload. <?php header("location: http://www.fileurl.goes.here.com"); ?> Code (markup): This is great to use if your having .htaccess problems or can't access it.
Well, I'm attempting to redirect a lot of different DIRs to new .html files... So that index idea won't work. Thanks anyway! Anyone else?
.htaccess is your best bet....I don't know of any host to date that does 301........godaddy says they have a 301 service but any external test I use sees a 302 anyway...
Yeah my host had nothing for me... I'm not sure why the 301 I have attempted is not working.. I'll keep at it.. In the mean time, anyone else have any TIPS?
I don't see how the PHP redirect wouldn't work, you can add a index.php file with the above code in EVERY directory you want to forward to a file.
ssandecki, I have not done any research on the PHP forward you are discussing. Is it a "Google friendly" / "SEO friendly" method? Thanks for the suggestions everyone!