Reputation: 13456
I have this htaccess rule:
RewriteCond %{REQUEST_URI} !assets
RewriteRule \.(?:jpe?g|gif|png)$ script.php
It redirects all image requests to script.php
. I'd like to exclude all requests that contain GET parameter, for example http://myweb.com/image.jpg?process=0
but have http://myweb.com/image.jpg
included.
How should I edit my rule? Thanks
Upvotes: 2
Views: 658
Reputation: 7739
Then you should test on the %{QUERY_STRING}
if does contain something :
RewriteCond %{REQUEST_URI} !assets
RewriteCond %{QUERY_STRING} !.+
RewriteRule \.(?:jpe?g|gif|png)$ script.php
Upvotes: 2