Why are my rewrite rules being ignored by WordPress?

I've got the following rule added:

news/([0-9]{4})/?$  archive-news.php?year=$matches[1]

but the URL news/2015 gives a 404.


1 Answer 1


All rewrite rules should point to index.php. This is a reference to the main index.php file through which all requests are routed, not a template file.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.