bimbom22
bimbom22

Reputation: 4510

Wordpress URL Rewriting Ignores Existing Files

I have wordpress installed at the web root directory of a server. I also have a file called test.php in the same directory that is not at all related or connected to wordpress (atleast not by any code within the test.php file). if i go to http://myurl.com/test.php i get my theme's styling and the wordpress error message for when it can't find a post at that particular url.

Is there a UI element in the Admin dashboard that allows you to change this behavior (I can't find one, but I wouldn't be surprised if I've overlooked it) or do I have to edit the modrewrite rules myself? Thanks.

Upvotes: 0

Views: 159

Answers (2)

TheDeadMedic
TheDeadMedic

Reputation: 9997

Even though you say your .htaccess has the correct RewriteCond, it is most likely misconfigured, or perhaps there are conflicting statements?

Can you post the entire contents of your .htaccess?

Upvotes: 0

eyelidlessness
eyelidlessness

Reputation: 63529

This is the .htaccess RewriteRule generated by a WordPress install I have. Note the RewriteConds:

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

!-f means if a file at that path does not exist. !-d means if a directory at that path does not exist.

Upvotes: 1

Related Questions