View Full Version : .htaccess forbidden access need a rewrite

04-20-2011, 07:13 PM
I'm vexxed, terribly vexxed.

I am having trouble with permissions in .htaccess. At one stage I installed a plug-in for site security and it protected from suspicious query strings. Some images like the one in the URL below


I deleted an offending rewrite rule in .htaccess which caused the error above where the ? query string value is removed or replaced with the & character.


This above is what should come up. But when I deleted the rewrite rule I didn't save a backup.

Does anyone know how to rewrite the condition above so & in the query string is replaced with ?

04-21-2011, 03:50 AM
... when I deleted the rewrite rule I didn't save a backup.

well, there's your problem :)

you would not want to simply replace all instances of & with ?, as it would give you invalid query strings when you tried to pass more than one variable. You would need to use a regex to find the specific & that you wanted to change. However, it would probably be far easier to find the rule that is changing them over in the first place and deal with it.

can you share your .htaccess file contents?

(BTW, this is not javascript: it should probably be moved to the "Other" coding forum.)