I have another PHP application in a folder named app
inside my Wordpress installation, and I need to disable all Wordpress rewrite rules for that folder and it's content. So that when I go to www.domain.com/app
I get my application page, instead of the standard Wordpress 404 page.
I know this is pretty basic apache rewrite rules, and i searched for this, tried some things and didn't work well.
Almost forgot, i need to do this only by editing Wordpress htaccess file. And the app has it's own htaccess file.
Thanks.
EDIT: htaccess content
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
EDIT: Application htaccess
DirectoryIndex index.php
<FilesMatch "\.(php|inc)$">
Order allow,deny
deny from all
</FilesMatch>
<FilesMatch "(index.php|download.php)$">
Order allow,deny
allow from all
</FilesMatch>
These rules don't do much, they basically deny access to all PHP
and INC
file types, except index.php
and download.php
. Which are the ones the user needs to access, the rest of them are classes used internally by PHP
.
EDIT 3: Resolution:
As it turns out, there was nothing wrong with the Wordpress htaccess
or the application, after turning error reporting on remote hosting server, PHP reported a corrupted file, once replaced, all started to work well. My thanks to Wietse Venema for the suggestion.
.htaccess
rules from the app? Is it a public app, or developed on top of a public framework (something we can know)?www.domain.com/app/index.php
, do you also get the Wordpress 404?ini_set('display_errors', 1); error_reporting(E_ALL);
just after the opening<?
of your index.php.