URL Rewrite 404

I’ve got the following ReWrite rule:

add_rewrite_rule(“details/([a-zA-Z0-9_]+)/.*”, “detail/?id=$matches[1]”, “top”);

Which seems to be adding in the following to my .htaccess, which now looks like this in its entirety:

BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteRule ^details/([a-zA-Z0-9_]+)/.* /detail/?id= [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

END WordPress

This doesn’t seem to work. I’m a bit unsure as to why it hasn’t put $1 on the end of the rewrite rule. Anyway I manually add that, and it seems to then be doing something. I can see that the title of the page has changed to that of of the rewritten page. The page itself however is still returning a 404 and the standard ‘OOPS! THAT PAGE CAN’T BE FOUND.’ message appears.

What have I done wrong?


Read more here:: URL Rewrite 404

Leave a Reply

Your email address will not be published. Required fields are marked *