tags:

views:

17

answers:

1

There is index.php and logo.gif files in my server. I need to change the way of display an adress from example.com/?nr=33&id=foo to example.com/33/foo or example.com/33/foo/. I have type in .htaccess this code RewriteRule ^([^-]+)/([^-]+)$ /?nr=$1&id=$2 [L].

It almost works, but when I use example.com/33/foo logo.gif (with is used in index.php) dissapears in a browser. Can you show me mistake in it?

A: 

When you enter a URL like example.com/33/foo in your browser, your browser will assume it is in a directory of that name, and request the (relative) URL logo.gif as

www.example.com/33/foo/logo.gif

Reference the image as

/logo.gif 

and it should work.

Pekka