Simple mod rewrite problem. The "real" URL is shown in the address bar.

Discussion in 'Apache' started by theprototype, Nov 15, 2008.

  1. #1
    I am new to php and don't have much experience.
    In my website footballhumour.com , the rewrites seem to be working but the problem is that the "real" URL is visible in the address bar of the browser.
    For example going to http://www.footballhumour.com/about-us/ takes us to the correct page but then again the address bar shows http://www.footballhumour.com/about-us.php instead of
    http://www.footballhumour.com/about-us/

    The rewrite rule in .htaccess is

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule about-us/$ http://www.footballhumour.com/about-us.php

    Any help will be appreciated. Thanks
     
    theprototype, Nov 15, 2008 IP
  2. mjewel

    mjewel Prominent Member

    Messages:
    6,693
    Likes Received:
    514
    Best Answers:
    0
    Trophy Points:
    360
    #2
    Try....

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule about-us/$ /about-us.php [L]

    If that doesn't work, you might want to make sure mod-rewrite is enabled on the server and there might be other rules that are conflicting.
     
    mjewel, Nov 15, 2008 IP
  3. theprototype

    theprototype Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank a lot. Works great . Rep added
     
    theprototype, Nov 15, 2008 IP