mod rewrite bug

Discussion in 'HTML & Website Design' started by siraxi, Jun 7, 2007.

  1. #1
    Hi all

    I need a little help with this: I'm trying to modify a script to have nicer URLs.
    Instead of http://www.mysite.org/user.php?id=joe I want this http://www.mysite.org/profile/joe

    No big deal in .htaccess
    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^profile/(.+) user.php?id=$1 [L]
    Code (markup):
    My problem is that I can see this page http://www.mysite.org/profile/joe just fine, except for images and styles, so that the page looks like parsed by a text browser.

    Where am I getting it wrong? Thanks!
     
    siraxi, Jun 7, 2007 IP
  2. siraxi

    siraxi Peon

    Messages:
    333
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Right, nevermind, I got it. This was the cause: playing with rewrite affects the way the folder structure is considered and consequently images which weren't referred to by the absolute path are not displayed.
    Thanks anyway.
     
    siraxi, Jun 7, 2007 IP
  3. Luke Jones

    Luke Jones Peon

    Messages:
    427
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Would this rewrite work with parsed rss feed urls too?
     
    Luke Jones, Jul 12, 2007 IP
  4. siraxi

    siraxi Peon

    Messages:
    333
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I think so.
     
    siraxi, Jul 16, 2007 IP