Sunday 18 January 2004 3:41:02 am
Hi folks,
I'm lucky to have my own webserver(s), so i can set up Virtual hosts with Rewrite rules for my ez-installations.
But as there are lots of (similar) questions arising here from persons with "URL, non-virtual-hosts"-Installs, i tried such an install, too.
To cut it short: It worked quite well. Currently, I'm fighting with the "safe mode" restriction, which does not let me call ImageMagick (my GD version is 1.6...to low). After I saw the user and admin sites, could log in and navigate, i remembered the .htaccess advice from the installer. So, i use the provided .htaccess_root file (renamed it) and voila: I got 403 (access denied) errors all over. I could not access anything.
WHAT'S THAT? Can someone please explain me, what happened and how the provided file should work?
This is the file's contents:
# Copy this file to a new file called .htaccess in your eZ publish root
# to make the site more secure in non-virtualhost mode (index.php used in urls). #
<FilesMatch ".">
order allow,deny
deny from all </FilesMatch>
<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html))$">
order allow,deny
allow from all </FilesMatch>
RewriteEngine On RewriteRule !\.(gif|jpe?g|png|css|js|html)$ index.php DirectoryIndex index.php ----
Now, what I understand, it should do:
1. Deny every access (worked fine!)
2. Allow access for "index.php" and the graphic files (did not work)
3. Rewrite all non-graphic files to index.php 4. Set index.php as Directory the index file
Now, my questions:
1. Will apache stop after the first "FileMatch"-block and thus deny every access? (This is, what seemed to happen to me) or will it evaluate all blocks?
2. Will the RewriteRule be parsed before the FileMatching? 3. How should this work with a URL like bla.com/dir/index.php/gallery/some/more/parameter? The second FileMatch will not allow this. So... do i have a strange configured webserver or why does this .htaccess not work for me at all?
Marco
http://www.hyperroad-design.com
|