I have two .htaccess files that I need to combine into one.
The first one does a simple file extension remover.
The second one rewrites all requests to go to a third party app, keeping our URL.
What I need is to have the rules be smart enough to not look at the second server if the file exists on the first.
Rule1 :
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
Rule 2:
Options +FollowSymLinks +Indexes
RewriteEngine on
RewriteRule ^(.*)$ http://third.party.com/$1 [P]
# RewriteCond %{THE_REQUEST}([^?\ ]+)
# RewriteRule ^.*$ index.php/%1
I'm far from an .htaccess wizard, so I'm all ears for suggestions.