I am having some mega frustrations with rewriting things on a local Wordpress install (installed via Bitnami). How does rewriting work in WP? It seems to have some PHP/database system plus a basic .htaccess file at the root of Wordpress?

Anyway I had this problem running on a basic WampServer setup https://stackoverflow.com/questions/22362774/basic-htaccess-rewrite-rule-not-working/22363852#22363852, which was solved. But now when I try it on this WP server I just get a page that says

Not Found It looks like nothing was found at this location. Maybe try a search?"

It looks like something in Wordpress is preempting my rewrite rules, but I have no idea what. Where is this Not Found page coming from? With WampServer I get a plain page with a message that says something like "file could not be found at /path/it/attempted".

I also tried a plugin simply called Rewrite, which didn't seem to do anything either.

  • OK, I see that it is going to the 404.php in the theme folder, but what is redirecting it there?
    – Moss
    Mar 12, 2014 at 23:05

2 Answers 2


Assuming pretty permalinks are enabled in settings, WordPress does attempt to add set of rules to the .htaccess.

In a nutshell their logic is to route anything that isn't existing file/directory to WP's index.php. After that WP is loaded and tries to interpret URL via its rewrite configuration and other data.

This does not exclude 404s either, they are too routed to WordPress and handled by it, typically producing output via corresponding template from active theme.

  • OK. Well I commented out all the stuff in the .htaccess file and it still goes to the same 404 page. I think if I had the rewrite rule set up correctly this wouldn't be a problem, but it is hard to debug the rule when all I see is this Not Found page.
    – Moss
    Mar 12, 2014 at 23:08
  • If I disable permalinks then it now thinks "localhost/asstes/whatever.jpg" is a directory and it sticks a / on the end, but then it just displays the WP home page.
    – Moss
    Mar 12, 2014 at 23:11

Bitnami installation by default do not enable htaccess. You will have to go into the bitnami apache configuration files and either do the modifications there, or enable reading the "local" htaccess files.

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.