Welcome to WebmasterWorld Guest from 184.108.40.206
I have transferred pages from the root into a folder and want to redirect SE's to the new location via redirectpermanent.
I used the following
RedirectPermanent /oldlocation.htm /http://www.mydomain/folder/newlocation.htm
and it always returns a 501 server error
I also tried
Redirect 301 (rest as above ....)
Redirect permanent (rest as above...)
This is the ONLY line in the .htaccess file - should there be something else in there?
If you want to redirect all files, rather than just oldlocation.html, try:
RedirectPermanent / [mydomain...]
Here's one I pulled off one of my old servers that I am actually using to redirect a "homepage" type account (with the tilde-name setup):
RedirectPermanent /~quux-corp/ [quux-corp.com...]
Hope this helps!
it think it should read
RedirectPermanent /oldlocation.htm [mydomain...]
I don't believe you want the "/" before the [.....]
I just checked mine and I dont have that "/" in my redirects.
Error code 501 is "Not implemented" - I wonder if that's the problem?
You could try:
RewriteRule ^oldlocation.htm$ [mydomain...] [R=permanent]
(Note: The RewriteRule all goes on one line, but appears wrapped to two or three lines here in the forum. The rule starts with "RewriteRule" and ends with "[R=permanent]")
I'm assuming that you only want to redirect the single file called "oldlocation.htm".
It may also be that your hosting service has not installed mod_rewrite, which is an optional module available in Apache 1.2 and later.