How can I make
http://www.domain.com/?l=nl&category=12
to
http://nl.domain.com/&category=12
with mod_rewrite?
Thanks for any help I can get.
//t.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z]{2})\.example\.com$ [NC]
RewriteRule ^(.+)$ /$1?l=%2 [QSA,L]
Options +FollowSymLinks -MultiViews
RewriteEngine On
#specifies where the application server should start from
RewriteBase /
# http://en.domain.com <-- http://www.domain.com/?l=en
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z]{2})\.domain\.com$ [NC]
RewriteRule ^(.+)$ /$1?l=%2 [QSA,L]
# change http://domain.com to http://www.domain.com
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L]
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(domain\.com)$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=p301,L]
# en.domain.com/* --> /*?l=en
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z]{2})\.domain\.com$ [NC]
RewriteRule ^(.*)$ /$1?l=%2 [QSA,L]
Users browsing this forum: No registered users and 90 guests