httaccess rewrite problem

Discussion in 'Programming' started by adviceforall, May 6, 2008.

  1. #1
    Can anyone please help me with this itrader if anyone can here is my current httaccess rewrite file:

    But then I have this URL

    http://www.YOURWEBSITE.com/chat/chat.js

    And when I try and enter this into my site it just says profile can't be found, does anyone know how I can add this URL to httaccess file so it doesn't act like a profile URL please??

    Thanks

    Rick
     
    adviceforall, May 6, 2008 IP
  2. pozzad

    pozzad Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    You're rewriting everything (css,js,html,...) to "view_profile.php?member_id=" and in my opinion this is a little difficult to maintain. I suggest you to change te rule to something similar to this:
    RewriteRule ^/profile/(.*)$ view_profile.php?member_id=$1
     
    pozzad, May 14, 2008 IP
  3. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #3
    Thats correct.

    Don't use catch-all
    RewriteRule ^(.*)$ view_profile.php?member_id=$1

    Use more specific alias such as
    RewriteRule ^my-profile-rewrite-(.*)$ view_profile.php?member_id=$1
     
    xrvel, May 14, 2008 IP