Sithu's avatar
Level 14

Does anybody use IIS 7 and Laravel 4.2?

Hi everyone.

Does anybody use IIS7 with Laravel 4.2? because every time I tried, I got .htaccess error.

HTTP Error 500.51 - URL Rewrite Module Error. The condition's expression "{C:\inetpub\wwwroot\ngc_web_portal\public.htaccess:{REQUEST_URI}}" is not valid.

Please help me if you know the answer. I've trying for two days with no luck.I've tried a lot of helps from google.

Thanks in advance.

0 likes
7 replies
abhimanyusharma003's avatar

All the request in laravel goes like this.

index.php/{R:1}

May be this one helps you.

I have never used ISS, but if you setup your rewrite rules correctly.

Sithu's avatar
Level 14

Thanks abhimanyusharma003. but it didn't help.

ritey's avatar

.htaccess doesn't work on Windows, you need to use a web.config for rewrite rules

Sithu's avatar
Level 14

Thanks ritey and bashy. I'll try.

Sithu's avatar
Sithu
OP
Best Answer
Level 14

Now I figured it out.I followed this one by Alvaro http://alvarotrigo.com/blog/installing-laravel-4-in-windows-7-with-iis7/ In my case, it didn't work with default .htaccess. I need to use another perspective from laravel documentation.

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
bashy's avatar

That's pretty much what my link showed you...

Please or to participate in this conversation.