angfreak
angfreak

Reputation: 1003

Url rewriting not properly applied

I have a web portal on which I have applied Url rewritting using rewriteModule.dll. I have define a rule like

<rule source="Voices" destination="Others/MyVoices.aspx"/>

It runs successfully.

But In my admin login I have a page named DefineVoices.aspx [In admin login I have not applied rewritting], when i have called DefineVoices.aspx then Url is converted into /Admin/DefineOthers/MyVoices.aspx.aspx

Please give me a solution without chage in my current url rule...

Upvotes: 0

Views: 61

Answers (1)

vendettamit
vendettamit

Reputation: 14677

You have to change your url replace algorithm because you might be using direct string replace. Which causing the url

/Admin/DefineVoices.aspx

to

/Admin/DefineOthers/MyVoices.aspx.aspx

In your rule you have specified a rule that replaces the word Voices to Others/MyVoices.aspx.

I would recommend to update your replace alogirthm and use Regular expression properly and only replace part of url not words.

e.g. exact word /voices to /Others/MyVoices.aspx

Upvotes: 1

Related Questions