eZ Community » Forums » Install & configuration » how to configure the htaccess file...
expandshrink

how to configure the htaccess file for the rewrite rule ?

how to configure the htaccess file for the rewrite rule ?

Wednesday 06 January 2010 7:32:52 pm - 2 replies

hi, i'm a newbie for ez publish system.

i wanto know how to configure the htaccess file to remove the index.php? in the url ?

who can tell me a right file. tks.

my ez publish version is 4.2.

there is my htaccess file below:

# 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|favicon\.ico|index_treemenu\.php|\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>
# If you see "Forbidden" when trying to access root page of your site
# without 'index.php' appended, uncomment the following "Files" section.
# NOTE: replace "ezpublish-4.1.0" with base name of the directory
# where your eZ Publish intallation resides.
# e.g. base name of "/sites/ezpublish/ezpublish-4.1.0" is "ezpublish-4.1.0".
#<Files "ezpublish-4.1.0">
# order allow,deny
# allow from all
#</Files>
RewriteEngine On
# Allow access to the index_treemenu.php file for a faster admin interface
RewriteRule content/treemenu/? index_treemenu.php
RewriteRule ^index_treemenu\.php - [L]
# Uncomment the line below if you placed your favicon at the root of your
# eZ Publish instance. It will then be served directly.
#RewriteRule ^favicon\.ico - [L]
# Uncomment the line below if you want you favicon be served from the standard design.
# You can customize the path to favicon.ico by replacing design/standard/images/favicon.ico
# by the adequate path.
#RewriteRule ^favicon.ico design/standard/images/favicon.ico [L]
RewriteRule ^design/standard/images/favicon\.ico - [L]
# Uncomment the line below once you set up the right robots.txt file
# In that case remember to also modify the FilesMatch rule abov
# More info here http://en.wikipedia.org/wiki/Robots.txt
#RewriteRule ^robots\.txt - [L]
# Uncomment the line below in case you are using
# Platform for Privacy Preferences Project ( P3P ) related files.
# In that case remember to also modify the FilesMatch rule above
# More info here : http://en.wikipedia.org/wiki/P3p
#RewriteRule ^p3p/(.+)\.xml - [L]
RewriteRule !(\.(gif|jpe?g?|png|css|js|swf|html?)|var(.+)storage.pdf(.+)\.pdf)$ index.php
DirectoryIndex index.php

how can i modify it ?

Thursday 07 January 2010 9:12:55 am

Did you have a look there : http://ez.no/doc/ez_publish/techn...3_10/installation/virtual_host_setup

Monday 01 February 2010 5:57:22 pm

Hi Mike and welcome aboard !

Have you considered using a Virtual Host setup ? This will make the removal of index.php easier. Pablo gave you a useful resource right above.

Let us know,
Cheers,

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from