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:

  1. start iis manager.
  2. on left, in connections pane, select default web site.
  3. on right, in features view, click url rewrite.
  4. on right, in actions pane, click import rules.
  5. copy mod_rewrite rules , paste them rewrite rules text box.
  6. 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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -