开发者

mod_rewrite and not displayed picture

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 .htacce开发者_JS百科ss 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜