WordPress – avoid opening php files as pages?

I have some php scripts in my WordPress directory and I’m unable to use them. Why? Because WordPress treat them as posts.

For example:

Read More

http://kaptinlin.com/themes/striking/wp-content/themes/striking/includes/sendmail.php

Points to a file and it works.

But on my site when i try to open /wp-content/themes/myTheme/anyDictionary/anyfile.php

it loads:

    Not Found

Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.

Page.

How to fix that?

Thanks

Related posts

Leave a Reply

1 comment

  1. The default WordPress mod_rewrite rules look something like this:

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

    In essence, this says “pass all requests through WordPress, unless the request corresponds to a real file or directory.” So, if you’re seeing a WordPress delivered page when you expect the output of a non-WordPress script:

    1. Your rewrite rules differ from the default; paste them for help debugging. Or,
    2. The file may not exist where you think it does.