Redirects on my subdomains are not working. I have
Redirect permanent /subdomain/onefile.html
http://www.domain.com/anotherfile.html
It give a 500 server error when I type in the file name.
This is a discussion on Redirects not working on subdomains in the Shared & Semi-Dedicated forum
Redirects on my subdomains are not working. I have
Redirect permanent /subdomain/onefile.html
http://www.domain.com/anotherfile.html
It give a 500 server error when I type in the file ...
Redirects on my subdomains are not working. I have
Redirect permanent /subdomain/onefile.html
http://www.domain.com/anotherfile.html
It give a 500 server error when I type in the file name.
Hehe, I've never been able to get that to work. No biggie, imo. Subdomain redirects don't keep the subdomain name in tact in the address bar anyway, so just use a META tag redirect.
Just put this between the <head> tags of onefile.html:
<META HTTP-EQUIV="refresh"
CONTENT="0;URL=http://www.domain.com/anotherfile.html">
Problem solved![]()
I have several to do, and I don't want to create new files for each one. I guess I'll have to do it this way for now, but if anyone knows a better way to do it, please let me know.
Well, it's not so much trouble as it sounds. Just create an index.html with nothing but
<html>
<head>
<META HTTP-EQUIV="refresh"
CONTENT="0;URL=http://www.domain.com/anotherfile.html">
</head>
</html>
No need to even have a body if the only thing it's doing is redirecting. Just adjust the url in the index.html file as neccesary and copy it to each subdoman directory that you want to redirect from.
how about in .htaccess
Code:RewriteEngine On RewriteBase /<pathtofile> # if you're not in your docroot directory RewriteRule ^somefile\.html$ anotherfile.html [R=301,L]
Any luck?
Yeah, I got lucky last night. Women! One day they want to kill you, the next day they want to eat you with a spoon.Originally posted by Ron
Any luck?
DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.
Just make sure there's no knife in her other hand...eat you with a spoon![]()
Last edited by Galen; 03-24-2004 at 07:56 PM.
I tried putting the re-directs in the htaccess of the subdomain, and that didn't work either.
How would that rewrite rule work? would I put that in the main sites .htaccess file, or the .htacess file in the subdomain?
It needs to be in the directory where the object of the redirect lives, not just the main directory. If that doesn't *HAPPEN* to be the docroot, then you need the RewriteBase line.
Methinks
Edit: Nevermind, late night - didn't read the original post well enough.
Copyright © 2011 JaguarPC.com
Bookmarks