1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mod Rewrite Help

Discussion in 'Apache' started by SH-Karl, Jul 10, 2010.

  1. #1
    Okay, I have my htaccess

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^quests/(.*)/(.*) /rhnew/pages/quests.php?flibble=questview&id=$1
    RewriteRule \.(gif|png|jpg|css|js)$|^index\.php$ - [L]
    RewriteRule ^(.*)$ index.php?page=$1 [NC]
    Code (markup):
    The problem I'm having is.

    I need the images to work, no matter which directory it is in, hence the:
    RewriteRule \.(gif|png|jpg|css|js)$|^index\.php$ - [L]

    Then I need to get the pages:
    www.mysite.com/quests
    www.mysite.com/quests/
    to work correctly with:
    RewriteRule ^(.*)$ index.php?page=$1 [NC]

    These all work find on their own.

    The problem I'm having is with:
    RewriteRule ^quests/(.*)/(.*) /rhnew/pages/quests.php?flibble=questview&id=$1

    I need that to work, with the images, however because of the index.php?page=$1 it won't work, is there another way I can rewrite that in order to not do it, if the URL has something after www.mysite.com/quests/insert_something_here?

    I hope I've explained well.

    Here's an example of another site doing what I'm aiming to acheive:
    http://www.zybez.net/quests/172/nomads_requiem/
     
    SH-Karl, Jul 10, 2010 IP
  2. SH-Karl

    SH-Karl Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nevermind, done it.
     
    SH-Karl, Jul 10, 2010 IP