views:

14

answers:

1

Hi there,

I've currently an url like that : play.php?place=idplace&event=idevent

I've enabled friendly url this way :

RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ play.php?place=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ /play.php?place=$1
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ /play.php?place=$1&event=$2
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/$ /play.php?place=$1&event=$2

For just one parameter (the place id there), all is ok. But when it comes two params (place and event) like that mysite/theplace/theevent all my relatives links (css, js and imgs) are not working, my page seems to think it is actually in the theplace/ folder, and non in the root/ one.

Ideas for this issue?

Thanx a lot

Guillaume

+1  A: 

You must use paths that are absolute from at least the domain, i.e.

/images/myimage.png

You may be able to fix this one problem in another way, but it will only become more annoying as your URL rewriting becomes more advanced.

MvanGeest
Thanks for you answer, I used images/myimage.png instead of /images/ and it works perfectly now!Thanks again
CoBaLt2760