Support » Everything else WordPress » Getting .htaccess to block /?/year/month

  • Alright, i’m trying to 301 the /?/year/month thing from apache. No matter what I enter in context to try and get it to 301 anything that goes to /?/ either causes a 500 error, or is ignored.

    Seems ? is an ambiguous character in the htaccess rewrite configuration and it treats it as a directive, versus an actual character i’m trying to pattern it with \? and (?) came with similar results.

    Current HTACCESS
    # Block rewrite from writing ads url
    RewriteCond %{REQUEST_URI} !^/ads/
    # Normal WordPress Rewrite
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Anyone have an idea on how to fix this?

  • The topic ‘Getting .htaccess to block /?/year/month’ is closed to new replies.