Mod Rewrite help

Discussion in 'Programming' started by Napoleon, Sep 28, 2008.

  1. #1
    Napoleon, Sep 28, 2008 IP
  2. daman371

    daman371 Peon

    Messages:
    121
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this. I know you left out the end of string character, $.

    RewriteRule ^?site/(.*)/?$ siteinfo.php?domain=$1 [NC, L]
    Code (markup):
     
    daman371, Oct 3, 2008 IP
    Napoleon likes this.
  3. So1

    So1 Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    RewriteRule ^site/(.*)[/]{0,1}$ siteinfo.php?domain=$1 [L]

    dont forget set RewriteBase / and RewriteEngine on :-D
     
    So1, Oct 4, 2008 IP
    Napoleon likes this.
  4. Napoleon

    Napoleon Peon

    Messages:
    732
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks, got it working, but the images and stylesheets are gone.
     
    Napoleon, Oct 5, 2008 IP
  5. GuitarFix

    GuitarFix Peon

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Give us an example of url of those images and stylesheets..
     
    GuitarFix, Oct 5, 2008 IP
  6. daman371

    daman371 Peon

    Messages:
    121
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yeah the url is being rewritten so the rewriterule has to be modified.
     
    daman371, Oct 5, 2008 IP