[solved] mod_rewrite parked domains
Posted: Wed Jun 13, 2012 12:53 pm
Hi all;
I have tried without success probably half a dozen times in the last few weeks, to get all of the parked domains to rewrite to the same domain uisng .htaccess mod_rewrite, but no matter what I do I am unable to get the domain rewriting to work at all.
The /parent/child rewrite works fine, no problem at all, but no matter what I do, I simply cannot rewrite the parked domains.
Any help would be really appreciated as I have spent soo much time on this, tried so many examples which were supposedly proven and guaranteed to work and made no progress at all !
Here's the .htaccess
I have tried without success probably half a dozen times in the last few weeks, to get all of the parked domains to rewrite to the same domain uisng .htaccess mod_rewrite, but no matter what I do I am unable to get the domain rewriting to work at all.
The /parent/child rewrite works fine, no problem at all, but no matter what I do, I simply cannot rewrite the parked domains.
Any help would be really appreciated as I have spent soo much time on this, tried so many examples which were supposedly proven and guaranteed to work and made no progress at all !
Here's the .htaccess
Code: Select all
Options -Indexes +FollowSymLinks
Order allow,deny
Allow from All
RewriteEngine on
# Redirect all parked not equal to www.domain.co.uk
RewriteCond %{HTTP_HOST} !^www\.domain\.co\.uk [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.domain.co.uk/$1 [L,R]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]