.htaccess help: Can't access non-wordpress php files in web root
-
I’ve been running a wordpress install for several years in the root oh my web host ( https://www.surfrock66.com ) I also have several other php pages for random things, like testing or special functions ( https://www.surfrock66.com/RygelWatch.php ).
I don’t know when it broke, but several versions ago all other pages not related to wordpress stopped working. That RygelWatch.php page (which is a view of my webcam to watch my dog when I’m not home) just presents a 404 page from wordpress. I know the problem is with my .htaccess file, and I’ve tried some of this: https://wordpress.stackexchange.com/questions/20152/cannot-access-non-wordpress-subdirectories-as-wordpress-overrides-them-with-a-40
None of it worked, and I don’t wanna move wordpress to a subdirectory. This used to work. I’ve tinkered with the .htaccess file a bit…but I have an 8 month old, so my tinkering time has gone down greatly and I need someone smarter than me to help ?? My .htaccess file for / is below:
AddType text/x-component .htc #Expire Header <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf)$"> ExpiresDefault A5184000 Header append Cache-Control "public" </FilesMatch> # compress the files AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript # removes some bugs BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html Header append Vary User-Agent # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine Off RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress ## BEGIN WORDPRESS LOCKDOWN ## ## IMPORTANT - If you customize the rules below, change the line above to read '## BEGIN WORDPRESS LOCKDOWN - CUSTOM ##' # Rules to protect WordPress from malicious code injections <FilesMatch "\.(php)$"> # Deny everyone but localhost access to PHP files. See the next stanza for index.php and wp-login.php public access. Order Deny,Allow Deny from all # Append additional IPs to the line below if external web access to PHP files is needed. Allow from 127.0.0.1 </FilesMatch> <FilesMatch "index.php|wp-login.php|wp-comments-post.php|wp-cron.php|load-styles.php|edit.php|post.php|wp-tinymce.php"> # Allow anyone to access files listed above. Allow from all </FilesMatch> ## END WORDPRESS LOCKDOWN ##
- The topic ‘.htaccess help: Can't access non-wordpress php files in web root’ is closed to new replies.