.htaccess

Author Message

Jack Rackham

Wednesday 27 October 2004 10:01:10 am

I suddenly found out that my .htaccess file was not working, can someone help me?
I pasted this code into my ez publish .htaccess file but it is not working.

<FilesMatch ".">
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

Jack Rackham

Wednesday 27 October 2004 1:32:50 pm

OK I found out it was much better to use Virtual Host instead, but according to EZ guide "RewriteEngine On" shall work in virtual host. But it only works in apache 1.x not in apache 2.x.
http://www.ez.no/ez_publish/documentation/installation/virtual_host_setup

I have tried the following code but it will not work

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php

</IfModule>

Jack Rackham

Thursday 28 October 2004 2:50:07 pm

I fixed the problem. I had just forgotten to turn on the "rewrite_module" in loadmodule.conf.

For the record this worked:

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

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