Mod Rewrite Problem

Discussion in 'PHP' started by adamjblakey, Apr 17, 2012.

  1. #1
    Hi,

    I currently have a rule set-up with is

    RewriteRule ^([a-zA-Z0-9-_]+)/$ profile.php?login=$1
    Code (markup):
    This will rewrite the support URL's like www.website.com/mypage/

    However what i would like is to have the URL's like www.website.com/mypage

    Without the last slash, how can i do this with the above.

    Thank you in advance.

    Adam
     
    adamjblakey, Apr 17, 2012 IP
  2. khalonn

    khalonn Greenhorn

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    Hello,

    Try to remove the slash from the expression in your .htaccess code line

    RewriteRule ^([a-zA-Z0-9-_]+)$ profile.php?login=$1
     
    khalonn, Apr 17, 2012 IP