PDA

View Full Version : This mod_rewrite should be a simple thing but I can't get it working


Fumigator
04-17-2007, 08:40 PM
After hours of trial and error messing around with my .htaccess file and the RewriteRule, I'm still nowhere.

I simply need to redirect to another directory within the same root structure, but keep the URL looking like we didn't go anywhere.

What's making this confusing for me is I am using multiple domains, which are all redirected courtesy my hosting company.

I want this URL:

www.alpha.com

..to redirect to this URL:

www.bravo.com

..including any directory path, filename, and query string that comes after. So www.alpha.com/test/photos.php?a=1992 should be the same file as www.bravo.com/test/photos.php?a=1992, but the URL in the browser should still show www.alpha.com/test/photos.php?a=1992.

The file directory looks like this:

/home/acctnm/public_html/alpha <--- hosting company redirects www.alpha.com to here
/home/acctnm/public_html/bravo <--- hosting company redirects www.bravo.com to here

This is easy, right??? :D If someone can help me out I'd really appreciate it.

(edit: bleh the editor really wants those urls to be clickable but they are just examples so don't bother clicking them)