WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp-content and accessing php files (2 posts)

  1. nicholascooper
    Member
    Posted 1 year ago #

    I have the same plugins installed for my local testing and live installation of wordpress.

    On live if I add a php file in wp-content I get a 404 but on testing I can see the file.

    What config values has been altered on live to cause this?

    Here is my htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) path$1 [L]
    RewriteRule ^(.*\.php)$ path/$1 [L]
    RewriteRule . index.php [L]

    I know files shouldn't be placed there but the problem is with a plugin and I'm just trying to identify and fix the problem.

    adrotate uses the url
    url.com/wp-content/plugins/adrotate-pro/adrotate-out.php to redirect outbound links, on testing it works on live I see the 404.

  2. nicholascooper
    Member
    Posted 1 year ago #

    Finally got to the bottom of it, it was a permission issue on the server. Just had to chmod -R a few directories.

Topic Closed

This topic has been closed to new replies.

About this Topic