PDA

View Full Version : mod_rewrite breaking images



Hypertext
17-08-2008, 08:35 PM
For instance I have
RewriteRule services services.php

If I go to example.com/services the services.png image in images/top/services.png will (I'm guessing) try and fetch that page as the image, is there any quick work-a-round? I tried using a not ( ! ) pattern, but didn't understand the correct syntax to make it work.

Appreciate help :)

Charlie

Hypertext
17-08-2008, 09:44 PM
Fixed - needed a carrot before (^), in order to force it to start with services ie

example.com/services
not
example.com/images/services.png

Agnostic Bear
19-08-2008, 02:13 AM
The ^ is used as not in regex.

Hypertext
14-09-2008, 07:30 PM
The ^ is used as not in regex.
What are you smoking? The start of a string?

Want to hide these adverts? Register an account for free!