php - Translating .htaccess to web.config -
i hosting php application on virtual windows server running iis.
the person wrote php website me asked me put piece of codes in .htaccess:
<ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule>
but application running on iis, need translate piece of codes web.config. 1 have experience this, please me translate them web.config?
thanks in advance!
what htaccess code redirecting requests otherwise result in 404 error (!-f , !-d mean "file not exist" , "dir not exist") /index.php.
iis7 has feature import mod_rewrite rules - use this:
- start iis manager.
- on left, in connections pane, select default web site.
- on right, in features view, click url rewrite.
- on right, in actions pane, click import rules.
- copy mod_rewrite rules , paste them rewrite rules text box.
- the tree view tab of converted rules box instantly shows result of conversion. can click xml view tab see how rules stored in web.config file.
(source)
Comments
Post a Comment