WordPress.org

Ready to get started?Download WordPress

Forums

Getting .htaccess to block /?/year/month (1 post)

  1. juicebox
    Member
    Posted 6 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.