skip to Main Content
<rule name="blog categories" stopProcessing="true">
                <match url="/?blog/categories/([^/]+)/" />
                <action type="Redirect" url="/blog/cat={R:1}" />
            </rule>

This is the code in web.config might be helpful to you.
my url : capcom/?page=2
I want to remove ‘?’ from the url or ‘/’.

2

Answers


  1. I suggest you just put a canonical url in your , which doesn’t have the query string on it. That might look like:

    <link rel="canonical" href="@Model.Current.Url">
    
    Login or Signup to reply.
  2. To use urls like …/page/2 instead of …?page=2 you can add this rule to the rewrite section of your web.config:

    <rule name="pagination" stopProcessing="true">
      <match url="(.+)/page/([0-9]+)$" />
      <action url="{R:1}?page={R:2}" type="Rewrite" />
    </rule>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search