Forum Moderators: phranque
I want to do somethink like this:
when I use this
www.orange.domain.com/contact.html
Should execute this:
www.domain.com/index.php?subdomain=orange&action=contact
I know how to do this:
To co wiem jak zrobiæ to
www.orange.domain.com
www.domain.com/index.php?subdomain=orange
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?(.*).domain.com$
RewriteRule ^([^*]*)$ index.php?subdomain=%2
I've found similar topic hire [webmasterworld.com...] but I can't rework it for my needs
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?(.*).domain.com$ [NC]
# This rule will match on any url which does not contain a slash
RewriteRule ^([^/]*)$ index.php?subdomain=%2&action=$1 [L]
This will turn www.orange.domain.com/contact.html into index.php?subdomain=orange&action=contact.html, but for example www.orange.domain.com/images/spacer.gif, www.orange.domain.com/contact and www.orange.domain.com/contact/ would be left untouched.