Results 1 to 2 of 2

Thread: .htaccess forbidden access need a rewrite

  1. #1
    Join Date
    Apr 2009
    Location
    Sydney, Australia
    Posts
    118
    Thanks
    16
    Thanked 1 Time in 1 Post

    Default .htaccess forbidden access need a rewrite

    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
    Code:
    http://afentis.com/_images/forensic_experts.png&w=75&h=70&zc=1%22
    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.

    Code:
    http://afentis.com/_images/forensic_experts.png?w=75&h=70&zc=1%22
    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 ?

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by sniperman View Post
    ... 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.)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •