Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

URL Rewrite with Web Applications

$
0
0

Hi,

I am running an ASP.NET 4.0 website using IIS7 on Windows Server 2008 R2.

The site has a number of Web Applications under the main domain (~/site1, ~/site2, ~/site3, etc...). Each Web Application is an instance of the same website source folder (D:\Websites\MySite), so you can access the same website at any of the following URLs:

http://www.mydomain.com
http://www.mydomain.com/site1
http://www.mydomain.com/site2
http://www.mydomain.com/site3

The same website is returned each time, but with slightly different content depending on which specific URL is called.

Everything has been working fine for months until I was asked to add some SEO optimizations using URL Rewrite. Every URL Rewrite rule I add produces the following error:

HTTP Error 500.52 - URL Rewrite Module Error.
The page cannot be displayed because an internal server error has occurred.

Config Error:Cannot add duplicate collection entry of type 'rule' with unique key attribute 'name' set to 'AddTrailingSlashRule1'

I have read elswhere that surrounding the <system.webServer> configSection in the web.config file with:

<location path="." inheritInChildApplications="false">

will fix this problem.

However, while it stops the error message from appearing, it also stops the URL Rewrite rules from working in any of the Web Applications (~/site1, ~/site2, ~/site3).

How can I get the URL Rewrite module to work with Web Applications?

Thanks for any help you can offer.


Viewing all articles
Browse latest Browse all 27852

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>