IIS7 and ASP.NET MVC4.5 have problem with .htaccess
9 posts
• Page 1 of 1
IIS7 and ASP.NET MVC4.5 have problem with .htaccess
Hello,
We are using ISAPI_Rewrite3 since few years. I was working great with our ASP.NET WebForms site. We are creating new version of out website right now and we are using MVC4.5 Framework.
There is a problem with ISAPI_Rewrite3. Our new application works with rewrite rules only when they are entered in httpd.ini file. But when we use separate .htaccess for new website rules don't work. In the old project in WebForms rules works great even in separate .htaccess file.
Could you help us solve this issue?
Best Regards
We are using ISAPI_Rewrite3 since few years. I was working great with our ASP.NET WebForms site. We are creating new version of out website right now and we are using MVC4.5 Framework.
There is a problem with ISAPI_Rewrite3. Our new application works with rewrite rules only when they are entered in httpd.ini file. But when we use separate .htaccess for new website rules don't work. In the old project in WebForms rules works great even in separate .htaccess file.
Could you help us solve this issue?
Best Regards
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: IIS7 and ASP.NET MVC4.5 have problem with .htaccess
Hello,
Sound like you have installed ISAPI_Rewrire2, not 3. ISAPI_Rewrite2 supports httpd.ini, while ISAPI_Rewrite3 supports httpd.conf. Also ISAPI_Rewrite2 does not support per-site configuration.
Also, make sure you do not download LITE version, that has limitations (http://www.helicontech.com/isapi_rewrit ... itever.htm)
Regards
Sound like you have installed ISAPI_Rewrire2, not 3. ISAPI_Rewrite2 supports httpd.ini, while ISAPI_Rewrite3 supports httpd.conf. Also ISAPI_Rewrite2 does not support per-site configuration.
Also, make sure you do not download LITE version, that has limitations (http://www.helicontech.com/isapi_rewrit ... itever.htm)
Regards
Re: IIS7 and ASP.NET MVC4.5 have problem with .htaccess
It was httpd.conf. Sorry for a mistake. I have full version of ISAPI_Rewrite3 installed for sure.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: IIS7 and ASP.NET MVC4.5 have problem with .htaccess
In this case the issue might be in permissions. ISAPI_Rewrite simply can't access .htaccess files. Try to resolve by following http://www.helicontech.com/isapi_rewrit ... curity.htm
Re: IIS7 and ASP.NET MVC4.5 have problem with .htaccess
I have added IIS_WPG and required permissions to sources directory. It still doesn't work.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: IIS7 and ASP.NET MVC4.5 have problem with .htaccess
ok. Now lets see what you use in your conf file. Please provide the rules you;re using
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: IIS7 and ASP.NET MVC4.5 have problem with .htaccess
Did you put "RewriteEngine on" on top?
Re: IIS7 and ASP.NET MVC4.5 have problem with .htaccess
Thank for this question, Andrew! Yes, I didn't have a RewriteEngine on on top. And I didn't had RewriteBase in my local .htaccess file. After writing those lines my .htaccess woks great. Many thanks!
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests