Jump to content

500 error after adding rewrite for track/trace in htaccess

Recommended Posts


i have added the following code segment to our htaccess

    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



Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...