Reputation: 129
I'm really struggling to write my .htaccess file properly. I would like the following to happen:
So far, I've managed to get as far as mentioned in the 1st point.
But can't work out where to go next to achieve the 2nd point.
Do I need to write new lines for a separate rule, or amend the current lines?
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{REQUEST_URI} !index\.php
RewriteCond %{HTTP_HOST} ^(.+?)\.domain\.com$
RewriteRule .* http://www.domain.com/index.php?id=%1 [L,P]
Any help appreciated.
Upvotes: 1
Views: 163