简体   繁体   中英

mod_rewrite to ISAPI Rewrite

my .htaccess code as below:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
ErrorDocument 404 http://www.intelligent-t.com/404

How to create httpd.ini file with the same above roles ???

There is no alternative for ErrorDocument directive and RewriteCond %{REQUEST_FILENAME} !-f in ISAPI_Rewrite 2, but the closest config will look like this:

[ISAPI_Rewrite]

RewriteRule /(?!(?:list|of|physical|files|and|folders))([^\.]+)$ /$1.php [I,L]

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