Tuesday, July 14, 2009

.htaccess RewriteRule in IIS 7.0

I'm working on a big PHP project on my new Vista (YUCK) machine. Sure enough I download the PHP source files and nothing will work on IIS. Its not processing the .htacess file.

This is how I got it to work.

I went to the IIS admin, selected the website that had the issue and in the control panel options. I right clicked in the panel and selected "Install Application from Gallery".


I then selected "PHP v5.-.-" (not pictured), and clicked install. (I already had installed PHP, but why not).

After that finished installing, an option for URL ReWrite 1.1 appeared in the next window. I selected it and installed it.

Once that is installed, select the site that you need to process your .htaccess file and double click the Rewrite URL icon.

A blank list will appear, but an option to import is in the upper right hand corner, click it.

Browse for your .htaccess file and import it. Any rules will be sucked into IIS.

BINGO-- It works.

I suppose I'll have to import it everytime I change it, but it works.

Hope this helps.

No comments: