- Code: Select all
RewriteEngine On
# subdomain code
RewriteCond %{HTTP_HOST} !^(www\.)?alomaytinh\.net$ [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.alomaytinh\.net$ [NC]
RewriteCond %1---%{REQUEST_URI} !^(.+)---/\1(/.*)?$
RewriteRule .* /%1%{REQUEST_URI} [QSA,L]
# fix for mod_dir conflict
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} !^(www\.)?alomaytinh\.net$ [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.alomaytinh\.net$ [NC]
RewriteCond %1---%{REQUEST_URI} ^(.+)---//?\1(/.*)?$
RewriteRule .* %2 [R=301,QSA,L]
What's problem???
It's does not work, why? Something sonfig for httpd.config????
pls, tks.