Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: .htaccess files problem |
|
Author |
|
mike_abc
Joined: 19 Feb 2017 Posts: 2 Location: Romania, Bucharest
|
Posted: Mon 20 Feb '17 9:23 Post subject: .htaccess files problem |
|
|
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
|
Posted: Mon 20 Feb '17 22:42 Post subject: |
|
|
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
|
Posted: Tue 21 Feb '17 8:48 Post subject: |
|
|
Ok,
Thanks. |
|
Back to top |
|
|
|
|
|
|