0

I have problem with IIS and url rewrite...

I'm getting urls like this http://www.mywebsite.com/this-is-my-article

I need to rewrite it to http://www.mywebsite.com/index.php/this-is-my-article

I was trying patterns and conditions that in theory should work, but they don't. After few hours of searching and trying I decided to ask you for help.

Could anyone tell me, how to set URL Rewrite module?

best regards M

1

1 Answer 1

1

You can try this rule, if you have any questions, please let me know.

<rule name="test1">
   <match url=".*$" />
   <action type="Rewrite" url="index.php/{R:0}" />
</rule>
Sign up to request clarification or add additional context in comments.

4 Comments

Hello Samwu... thanks for the answer... The point is that there is no one article only... there is more or them so I need some kind of universal rule that will handle all of them. When I use the console to enter the rule, I need to put there: pattern, match and action. Does anyone know how to do it?
You mean this-is-my-article is not fixed? If so, then you can change the parameter to ^.*$ (<match url="^.*$" />), it can match any data. If I misunderstand your requirement, please post more details information about your requirement give some examples.
You're right! That works for me. Thank you!
Can you accept the answer? This can help more people solve the same problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.