mod_rewrite rewriting url problem

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
potato
Forum Contributor
Posts: 192
Joined: Tue Mar 16, 2004 8:30 am
Location: my lovely trailer, next to the big tree

mod_rewrite rewriting url problem

Post by potato »

Hi,

i working to rewrite my urls.
I changed the .htaccess file and put this in:

RewriteEngine On
RewriteRule artikels/([0-9]+).htm artikel.php?id=$1


So, if the url is artikel.php?id=17 then normally it would be artikels/17.htm

Fot that no problem, bu it changes my page!
Have a look at the page of the non rewritten url here.
and the page of the rewritten url here 8O

Somebody knows what i did wron or what i hev to do to make my page look normal like i wroted it?

greets,
tom
thekisab
Forum Newbie
Posts: 4
Joined: Wed May 12, 2004 4:42 am

Post by thekisab »

The browser is looking for images in the directory, because your image addressing is relative:
http://www.bevibed.be/bandscom/nieuws/artikels/

obviously there are no images there because its the php scipt. Normally it would look for them relative to http://www.bevibed.be/bandscom/nieuws/

Just use absolute links to your images so the src will be

http://www.bevibed.be/bandscom/images/imagename.jpg
User avatar
potato
Forum Contributor
Posts: 192
Joined: Tue Mar 16, 2004 8:30 am
Location: my lovely trailer, next to the big tree

Post by potato »

thank you very much, its ok now!!
Post Reply