Forum Moderators: phranque

Message Too Old, No Replies

The Rewrite Rule About .htaccess

The Rewrite Rule in the .htaccess

         

lovechina

12:33 pm on Jan 11, 2007 (gmt 0)

10+ Year Member



Now , the url i want to rewrite:

[avi.domain.com...] but not [avi.example.com...]

the real url is :http://www.example.com/avi_index.html,
in the folder there's no "index.html" , only have "avi_index.html"

and :
[avi.example.com...]

the real url is: [avi.example.com...]

Written In the .htaccess, I don't Know How to do

"Here is a better way to do that: (But It Can't Work)

RewriteEngine on
#
RewriteRule \.htaccess$ - [F]
#
RewriteCond %{HTTP_HOST}!^www\.
RewriteCond %{ENV:SdRw}!^done$
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com
RewriteRule (.*) /%1_$1 [E=SdRw:done,L]

Have Another Way To Do That?