htaccess rewrite still showing old URL in address bar

Discussion in 'Site & Server Administration' started by pictureboarduk, Jan 19, 2017.

  1. #1
    I am trying use some nice and simple htaccess syntax to hide the dynamic URLs within my site.

    Clicking the links which use the new/SEO-Freindly URLs works fine and it take them to the right dynamically generated page, BUT the dynaic URL is being shown in the address bar, not the new/SEO-Friendly one.

    Here is my htaccess file code:

    
    Options +FollowSymLinks
    RewriteEngine on
    
    Redirect /post/new-seo-friendly-url/ /post.php?id=1
    RewriteRule /post/new-seo-friendly-url/ /post.php?id=1
    
    Code (markup):
    So when I click on:

    It does take me to:

    Like I want, but I want to see:

    In the address bar, not:

    Could anyone provide me any assistance here?

    Thank you very much. :)
     
    pictureboarduk, Jan 19, 2017 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,828
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #2
    take out the redirect and let the rewriterule do it's thing.
     
    sarahk, Jan 19, 2017 IP