So here’s my basic problem that I can’t solve even after going through the mode_rewrite documentation (I guess my regex knowledge is just too sucky…):
I got this client’s site (going online VERY soon…) that has 3 domain names pointing to it. I need any URI pointing to either one to be redirected to the main URL + keeping the Query string and the file name BUT without the extension (.php in that case).
Here are a few examples:
http://www.example_one.com -> http://example_one.com
http://www.example_two.com -> http://example_one.com
http://example_two.com -> http://example_one.com
http://www.example_two.com/file.php -> http://example_one.com/file
http://www.example_two.com/file.php?var=1 -> http://example_one.com/file?var=1
My guess is that you need one mode_rewrite rule just to strip the “.php” from the URI and then one for each additional domain that need to go to the main domain… But everything I tried just failed pathetically…
Any regex/mode_rewrite gurus in the house yo?