Forum Moderators: phranque
So here's a hybrid of what you offered and what I already had.
ErrorDocument 403 /403.php
Order Deny,Allow
<Files *>
Deny from all
Allow from IP ADDRESS
</Files>
<Files /403.php>
Allow from all
</Files>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)\.htm$ $1.php [T=application/x-httpd-php]
RewriteRule ^(.*)\.html$ $1.php [T=application/x-httpd-php,L]
That last part is necessary for me to do my testing on the cart. I wasn't sure why you used the RewriteRule you did.
I thought the below is as easy as it gets ...hehe
order deny,allow
<Files *>
deny from all
allow from my.ip.address
</Files>
Ok, jdMorgan - dope slap accepted and the code duly updated.
Re: 403
It's not working. <snip>
I just realized it was choking because my 403 page is calling external resources like an include and header images which are denied!
So the next question becomes do I use multiple FILES directives or can I combine them?
Order Deny,Allow
<FilesMatch (.*)>
Deny from all
Allow from my ip address
</FilesMatch><FilesMatch (403\.php¦footer\.php¦style\.css¦header\.gif¦nav\.php)>
Allow from all
</FilesMatch>Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([^.]*)\.html?$ /$1.php [T=application/x-httpd-php,L]ErrorDocument 403 /403.php
The odd bit is that I had to explicitly include the nav file in the FilesMatch Allow section.
Jim