Forum Moderators: phranque
Here is an example of what I need to do... If I'm just an idiot, feel free to let me know :)
incoming url= [dog.domain.com...]
redirect to= [domain.com...]
or
incoming url= [cat.domain.com...]
redirect to= [domain.com...]
or
incoming url= [mouse.domain.com...]
redirect to= [domain.com...]
Am I making sense? It seem from what I have read that Apache rules in redirects, rewrites and such... but being a recent convert from IIS and Domino I just don't have the skills to figure this out it seems.
Thanks to anyone that can help!
Welcome to Webmasterworld!
There are a couple ways to acomplish this, and both depend on certain moidules being in your Apache build... either mod_rewrite or mod_alias. The first allows more complete rewriting, but for this, either will do...
for mod_alias, just add this to your httpd.conf on the appropriate <Container>
RedirectPermanent /URI/TO/OLD/REQUEST/ [URL...]
Note: URI vs. URL- you use BOTH, but you cannot switch one with the other. Your fisrt rewrite would be written:
RedirectPermanent / [domain.com...]
More info here: [httpd.apache.org...]
For mod_rewrite, you would do this:
ReWriteEngine ON
RewriteRule Expression New Location [CODES]
This is much more complex, but you can do a lot more with it, too. But be very careful, it can be quite powerful, and do things you may not expect.
More info here: [httpd.apache.org...]
Good Luck!
dave