adding a trailing slash in url - url rewrite

Posted on 2010-09-07
Last Modified: 2012-06-21
Hello, we're trying to add a trailing slash in a url of a website coded in IIS 7

right now the webpage is:


we want to change it to:


the only thing we can do know w/ IIS rewrite is change it to:


do you have any suggestions?  Thanks for any help...
Question by:echoEMC2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 10

Expert Comment

ID: 33622772
create a folder named leads  under the root directory
move leads.html to be in the folder leads
rename leads.html    into index.html
point your browser to  .com/leads/

you are done

Accepted Solution

Luigi2009 earned 500 total points
ID: 33623693
You have to create URL rewrite rule for IIS7 web site. It will automatically rewrite input url in format /leads/ to leads.html
First of all download and install rewrite module for IIS7 using web platform installer.
Then create new rewrite rules.

You can use rewriteMaps more information you can find here:

Expert Comment

ID: 33624835
I use URLReWriter, it is easy and free

a rule as yours would be:
<rewrite url="~/Public/Thankyou" to="~/Public/Thankyou.aspx" processing="stop"/>

AWS Certified Solutions Architect - Associate

This course has been developed to provide you with the requisite knowledge to not only pass the AWS CSA certification exam but also gain the hands-on experience required to become a qualified AWS Solutions architect working in a real-world environment.


Author Comment

ID: 33629111
Hey guys, sorry I forgot to mention we are using mvc 2

Any suggestions since it's mvc 2?  Thanks.

Expert Comment

ID: 33631931

Expert Comment

ID: 33631937
below is a link talking about using routing instead of url rewriting

Author Closing Comment

ID: 33664391
The solution was to use the url rewrite module for iis 7 as this url says:

Then, you need to create a new helper instead of using the default Url.Route(), like a Url.RouteTrailingSlash() that adds a "/" at the end of the urls.

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question