Jump to content

500 error after adding rewrite for track/trace in htaccess


Elsen1980
 Share

Recommended Posts

hello,

i have added the following code segment to our htaccess

    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
 

To this code:

# 8. ProcessWire requires mod_rewrite
# -----------------------------------------------------------------------------------------------

<IfModule mod_rewrite.c>

  RewriteEngine On
  AddDefaultCharset UTF-8
--- the code was added here ---

 

We got an 500 error, i deleted the code again, but the error is still... could someone help me please???

Thank you

Elsen

mykfcexperience

Link to comment
Share on other sites

Hmm, this reminds me of something from Jeff Starr over at Perishable Press. His stuff usually works very well. Perhaps you made some other inadvertent edit to the htaccess file? 

Did you do a graceful reload on Apache when you made the edits?

If you do find the error to be somewhere else, and do decide to add the track/trace protection, you might want to make it case insensitive and add some other verbs in there too. Something like this...

        RewriteCond %{REQUEST_METHOD} ^(connect|debug|move|put|trace|track) [NC]
        RewriteRule .* - [F]

Which is just a snippet from Jeff's 6G Firewall. Or just use his entire script at the top of your htaccess file.

There's also the beta version of his 7G Firewall available which I am using on a couple of sites.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...