Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: bakedjake
header("HTTP/1.1 301 Moved Permanently");
Is there some way to achieve the redirection with the trailing uri remaining intact and hence going to the page itself?
I'm using Apache 1.3.33 on a debian linux system.
Thanks in advance :)
I tried the following:
RewriteRule (.*)$ http://subdomain.domain.net/$1 [R=301,L]
But the issue was that since this is for a subfolder, it worked when there was a trailing slash or a longer url but failed for the folder name without a trailing slash.
So, "http://subdomain.old-site.net/foldername/" and "http://subdomain.old-site.net/foldername/somefile" both get redirected correctly, "http://subdomain.old-site.net/foldername" did not forward correctly but infact forwarded to the new domain appended with the filesystem path of that directory.
eg. "http://subdomain.new-site.net//home/username/public_html/aj/foldername" which of course is incorrect.
I would prefer to use a 301 redirect so as to maintain my page rank as well as easily allow SEs to locate the new site..