Forum Moderators: phranque
[#*$!.example.com...] the real url is: http://www.example.com/#*$!.html
there should have the 'www'
What Should Write In The .htaccess
here is:
[#*$!.example.com...] to http://www.example.com/folder/#*$!.html
RewriteEngine on
RewriteRule ^\.htaccess$ - [F]
RewriteRule!^www\.
rewritecond %{HTTP_HOST} ^([^.]+)\.example\.com
rewritecond $1!^lk_
RewriteRule (.*) /lk_aaa/%1$1_index\.html
If I Want To Have 'www', How Do?
RewriteEngine on
#
RewriteRule ^\.htaccess$ - [F]RewriteCond !^www\.example\.com
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.example\.com
RewriteCond $1 !^lk_
RewriteRule (.*) /lk_aaa/%2$1_index\.html
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteCond %{HTTP_HOST} ^([^.]+\.)?example\.com
RewriteRule (.*) http://www.%2example.com/$1 [R=301,L]
Jim