Monday, 24 November 2014

Non-existing pages with "?p=" redirects to 404 page in wordpress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

RewriteCond %{QUERY_STRING} p=.*
RewriteRule .* - [R=404]

No comments:

Post a Comment