Forums / Install & configuration / how to configure the htaccess file for the rewrite rule ?

how to configure the htaccess file for the rewrite rule ?

Author Message

Mike Kent

Wednesday 06 January 2010 10:32:52 am

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 ?

Pablo Pernot

Thursday 07 January 2010 12:12:55 am

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

Pablo Pernot
http://www.smartview.fr
http://www.areyouagile.com

Nicolas Pastorino

Monday 01 February 2010 8:57:22 am

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,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

eZ debug

Timing: Jan 18 2025 02:09:37
Script start
Timing: Jan 18 2025 02:09:37
Module start 'content'
Timing: Jan 18 2025 02:09:37
Module end 'content'
Timing: Jan 18 2025 02:09:37
Script end

Main resources:

Total runtime0.2246 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 587.9766180.8047
Module start 'content' 0.00740.0049 768.781398.0078
Module end 'content' 0.01230.2122 866.7891533.4531
Script end 0.2245  1,400.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00401.8014200.0002
Check MTime0.00140.6163200.0001
Mysql Total
Database connection0.00110.490310.0011
Mysqli_queries0.177779.13291410.0013
Looping result0.00130.59371390.0000
Template Total0.211994.410.2119
Template load0.00090.394110.0009
Template processing0.211093.966710.2110
Override
Cache load0.00070.290410.0007
Sytem overhead
Fetch class attribute can translate value0.00100.462310.0010
XML
Image XML parsing0.00030.125210.0003
General
dbfile0.00341.5006200.0002
String conversion0.00000.002230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs