.htaccess file does allow access to my root

Author Message

Clay Pereira

Thursday 29 July 2004 10:09:40 am

Hi,

When i added the .httacces file I can't get access to my site by just typing the hostname.
I have to include /index.php. What redirect do I have have to add to make it so I don't have to add the index.php.

Something apears to be wrong with my <FilesMatch".">

<FilesMatch ".">
order allow,deny
deny from all
</FilesMatch>

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html|swf)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

Jose Velez

Thursday 18 November 2004 7:06:01 pm

I am having the same problem. Does anyone know how to fix this?

Espen Pedersen

Monday 06 June 2005 9:29:55 am

I experience the same thing. Anyone cracked this one?

kracker (the)

Monday 06 June 2005 9:49:11 am

I <b>always</b> removed / commented those lines out, if I used the .htaccess file. I just never mentioned it before .. hrm.

//kracker

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Espen Pedersen

Monday 06 June 2005 11:52:40 am

Thanks for you answer kracker, I have removed:

</i><FilesMatch ".">
order allow,deny
deny from all
</FilesMatch></i>

And I've tried accessing f.ex. a ini file directly and it's not possible, so I guess this should be OK.

<b>But now I've got the trailing slash problem</b>, and yes I have tried Ekkehard's suggestions found in this thread: http://ez.no/community/forum/install_configuration/htaccess_hidden_at_last

<b>But it does not work :'(</b>

Espen Pedersen

Monday 06 June 2005 12:10:52 pm

Hmm .. think I have a workaround, it's not pretty but I think it does the job.

The trailing slash problem is caused by the rewrite rule. The .htaccess shown below will deny access to certain kind of filetypes, it's a bit vulnerable as you have to provide all the file extensions by hand ...

If someone provides a more robust solution for this I would be pleased :)

php_value allow_call_time_pass_reference 0

<FilesMatch "\.(txt|tp|tlp|cache|info|sql|ini|php|sh|pdf|log|LOG|tr|ttf|ts|xml|cpp)">
order allow,deny
deny from all
</FilesMatch>

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

RewriteEngine On
#RewriteRule !\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php

kracker (the)

Monday 06 June 2005 2:14:37 pm

<b>*smacks his own forehead*</b>

What version of apache are you using with eZ publish.

I had the very same problem with eZ publish 3 (or greater) on Apache 2 in a couple of specific instances over the last year.

So I wrote up a report, not exactly sure just what's going on ...
http://ez.no/community/bugs/ezurloperator_php_incompatibility_with_apache2

I also posted to the sdk-public list:
http://lists.ez.no/pipermail/sdk-public/2005-May/001279.html
http://lists.ez.no/pipermail/sdk-public/2005-May/thread.html#1279

//kracker
<i>Aesop Rock : Labor Day : Save Yourself</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Espen Pedersen

Tuesday 07 June 2005 12:28:39 am

Here's my phpinfo() output

Apache/1.3.33 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a

Thanks for the links, I'll read through them and see if it can help me :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:34:43
Script start
Timing: Jan 18 2025 11:34:43
Module start 'layout'
Timing: Jan 18 2025 11:34:43
Module start 'content'
Timing: Jan 18 2025 11:34:44
Module end 'content'
Timing: Jan 18 2025 11:34:44
Script end

Main resources:

Total runtime0.7554 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.2813152.6563
Module start 'layout' 0.00740.0029 741.937539.4922
Module start 'content' 0.01030.7434 781.4297673.8594
Module end 'content' 0.75370.0017 1,455.289120.1250
Script end 0.7554  1,475.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4704160.0002
Check MTime0.00140.1876160.0001
Mysql Total
Database connection0.00110.147310.0011
Mysqli_queries0.679489.9430760.0089
Looping result0.00080.1004740.0000
Template Total0.722795.720.3614
Template load0.00230.299420.0011
Template processing0.720495.370520.3602
Template load and register function0.00020.030810.0002
states
state_id_array0.00090.116110.0009
state_identifier_array0.00080.110420.0004
Override
Cache load0.00200.2606500.0000
Sytem overhead
Fetch class attribute can translate value0.00060.080040.0002
Fetch class attribute name0.00110.1460100.0001
XML
Image XML parsing0.00360.480540.0009
class_abstraction
Instantiating content class attribute0.00000.0040140.0000
General
dbfile0.00390.5136240.0002
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 38
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs