On a windows server. I want a user to see the page www.example.org/placrun when they go to www.example.org/placestorun, but I want the url to be www.example.org/placestorun. Essential I need the url changed. Any help on this would be great
Asked
Active
Viewed 26 times
-1
-
If it's so simple why not share? – sjw0525 Apr 03 '18 at 19:46
-
https://stackoverflow.com/help/how-to-ask – Lex Li Apr 03 '18 at 19:48
-
And I don't want to redirect a url. I want to change it – sjw0525 Apr 03 '18 at 19:49
1 Answers
0
The name of this feature is "Rewrite". You need to add this rewrite rule to your web.config file:
<rule name="Rewrite placestorun">
<match url="^placestorun$"/>
<action type="Rewrite" url="/placrun"/>
</rule>
The regexp ^placestorun$
will match only if you visit URL www.example.org/placestorun and <action type="Rewrite" url="/placrun"/>
define a result that you want to rewrite it to placrun
URL

Victor Leontyev
- 8,488
- 2
- 16
- 36