mod_rewrite problems

Discussion in 'Apache' started by Mr. Damnation, Jul 28, 2008.

  1. #1
    So far I'm having troubles with mod_rewrite. I have it set so that /index?p=blah turns into /blah.

    That works. However, when I try to rewrite it so it rewrites it to /blah/ adding that extra slash completely kills loading all the stylesheets and images and anything that has a link that doesn't start with http://etc/

    Do I need to just bite the bullet and give full links to everythign? Is that better for SEO anyway?

    RewriteEngine on
    RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?p=$1
    RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?p=$1 [L]
    Code (markup):

     
    Mr. Damnation, Jul 28, 2008 IP
  2. mr_inisibile

    mr_inisibile Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    if the redirect works with the trailing slash, then it ummm, works lol.

    it sounds like you are referencing your stylesheets relatively perhaps? maybe they need updating? send us a link to the page so we can check it out.
     
    mr_inisibile, Jul 28, 2008 IP
  3. Mr. Damnation

    Mr. Damnation Peon

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Mr. Damnation, Jul 28, 2008 IP
  4. Mr. Damnation

    Mr. Damnation Peon

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No one can help?
     
    Mr. Damnation, Jul 29, 2008 IP