简体   繁体   中英

ISAPI_Rewrite Rule for version 2

How can I write the following rule in older version of ISAPI_rewrite ?

RewriteCond %{HTTP_HOST} ^fit-reisen.de$ [NC]
RewriteRule ^(.*)$ http://www.fitreisen.de/$1 [R=301,L]

I tried to write like

RewriteCond Host: (?!^www.fit-reisen.de)(.+)
RewriteRule /(.*) http\://www.fitreisen.de/$2 [I,RP]

but i did not work.

I don't know ISAPI_rewrite very well. But try this:

RewriteCond Host: ^fit-reisen\.de$
RewriteRule ^(.*)$ http\://www.fitreisen.de$1 [I,RP,L]

The syntax for ISAPI_Rewrite2 should be as follows:

RewriteCond Host: fit-reisen\.de
RewriteRule (.*) http\://www.fitreisen.de$1 [RP]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM