MyBB Community Forums

Full Version: mod_rewrite</3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having such a horrible time with m_r. I want to redirect all traffic to clients.magellis.net to clients.host2x.com, but keep the url.

For example, http://clients.magellis.net/somefile.php?action=dostuff should pull the data from http://clients.host2x.com/somefile.php?action=dostuff - but the address bar should STILL SAY CLIENTS.MAGELLIS.NET!

Tried this, it doesn't work.
Quote:RewriteEngine on
RewriteCond %{HTTP_HOST} ^clients.magellis.net [NC]
RewriteRule ^(.*)$ http://clients.host2x.com/$1?systpl=default [L]
set clients.magellis.net as a server alias (parked domain in cpanel)
Not sure if you use cPanel or not, but if you don't you just add a CNAME record for clients.magellis.net that points to clients.host2x.com.
+1 to the above. DNS is much cleaner than mod_rewrite (and not additional server processing is always good for website speeds).
Ugh, this is what a long week does to my brain. Thanks guys.
Still, how would I do this with mod_rewrite? Because I want to add a parameter to each page.