Forum Moderators: phranque

Message Too Old, No Replies

Rewrite rule help

         

Karl456

1:15 pm on Jul 10, 2010 (gmt 0)

10+ Year Member



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]


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:
[zybez.net...]

Karl456

4:07 pm on Jul 10, 2010 (gmt 0)

10+ Year Member



Nevermind, fixed it :)