i use :
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.domain\.com$ [NC]
RewriteCond %{DOCUMENT_ROOT}/%2%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www\.)?([^\.]+)\.domain\.com$ [NC]
RewriteRule ^(.*)$ index.php?user=%2 [QSA,L]
and this is work
example :
http://test.domain.com = http://domain.com/index.php?user=test
this is cool . but i want make other rewrite
for example
i want
http://test.domain.com/news-12.html = http://test.domain.com/news.php?id=12
how i can make it ?
so,i use
- Code: Select all
RewriteRule ^news-([0-9]*).html news.php?id=$1 [L]
but this is not work
please help me