logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: .htaccess files problem
Author
mike_abc



Joined: 19 Feb 2017
Posts: 2
Location: Romania, Bucharest

PostPosted: Mon 20 Feb '17 9:23    Post subject: .htaccess files problem Reply with quote

Hi,

I am new to Apache configuration. I read & googled about Apache directives yesterday, basically allow,deny, but that's it.

On my hosted website, I need to enable access to two index.php files, one in the document root, the other in a subfolder of document root.

The directives (part of them suggested by webhosting support) are:

Document Root

Code:
<FilesMatch "^\.htaccess">
order deny,allow
deny from all
</FilesMatch>

<FilesMatch "index[0-9]?\.php$">
order allow,deny
allow from all
</FilesMatch>



Subfolder of Document Root:

Code:
<Files "index.php">
order Deny,Allow
Deny from all
Allow from <IP Address>
</Files>


However, the main .htaccess file invalidates the one in the subfolder - I cannot access the index.php in the subfolder (I see a blank webpage in Mozilla Firefox).

Could you briefly explain what the 2-nd directive block in the main .htaccess file does ? What needs to be changed as to make the subfolder index.php accessible ?


Question #2:

What type of RegExp does Apache use ? PERL, ... ?
Where can I read a good tutorial or examples on this part of Apache configuration directives ?

Thanks !
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 20 Feb '17 22:42    Post subject: Reply with quote

If you see a blank page and not a 403 then it probably is working, but everything else is denied supporting that index.php page. Check the php_error.log is probably a good thing to do as it might give you hints as to what is wrong.

Try with in simple text file where php is not involved and see if you see the text in said text file.
Back to top
mike_abc



Joined: 19 Feb 2017
Posts: 2
Location: Romania, Bucharest

PostPosted: Tue 21 Feb '17 8:48    Post subject: Reply with quote

Ok,

Thanks.
Back to top


Reply to topic   Topic: .htaccess files problem View previous topic :: View next topic
Post new topic   Forum Index -> Apache