How to redirect dynamic url to static

Discussion in 'Site & Server Administration' started by RemarBarquilla, Jan 7, 2014.

  1. #1
    Hello guys, sorry for posting here. I can't see an iis server cat here.

    My question is, how are you going to redirect the dynamic url to static url in webconfig.

    ex. site(dot)com/news.aspx?1 to site(dot)com/news/post-number-one

    Hope someone can help with this problem.
     
    RemarBarquilla, Jan 7, 2014 IP
  2. sahabcse

    sahabcse Well-Known Member

    Messages:
    272
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    140
    #2
    This may helps
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$
    RewriteRule ^dynamic\-url\.php?id=43$ "http:\/\/static\/page\/url\/inserted\/here" [R=301,L]
     
    sahabcse, Jan 8, 2014 IP