URL without siteaccess name

Author Message

Veronique Jamilloux

Saturday 06 November 2010 8:45:44 am

Hi,

My eZpublish is 4.2 and my site is managed by Apache without virtual host.

I would like to hide my siteaccess name in the URL. So I put in the site.ini,

RemoveSiteAccessIfDefaultAccess=enabled in the section [SiteAccessSettings]

But my URL looks like : http://morgoth.versailles.inra.fr/index.php//Tools/REPET

The siteaccess name is hiden but there is // !

How can I do to have only one / ?

2scd question : Use rewrite rules in httpd.conf or .htaccess file, is there the only way to get out index.php from the URL? IF no what is the other way?

Thank a lot for your answer

Véronique

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

Edi Modrić

Saturday 06 November 2010 9:25:45 am

To get rid of index.php, you need to add "ForceVirtualHost=enabled" in [SiteSettings] group in settings/override/site.ini.append.php and modify your .htaccess per following instructions.

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Installation/Virtual-host-setup

This may also solve your problem with double slash.

eZ Publish certified developer

http://ez.no/certification/verify/350658

Edi Modrić

Saturday 06 November 2010 9:29:22 am

Whoops, sorry, didn't notice that you don't have access to virtual host in apache. Not sure if this will work then.

I've had varying results with trying to remove index.php when not having virtual host setup and ultimately I would just get access to virtual host and be done with it.

eZ Publish certified developer

http://ez.no/certification/verify/350658

Thiago Campos Viana

Saturday 06 November 2010 10:38:39 am

Change your SiteURL settings in your default siteaccess site.ini.append.php, the SiteURL may not end with '/' neither the siteaccess name, just 'index.php', and then clear the cache. There are already topics about removing index.php from url, I use .htaccess:

Options -Indexes


DirectoryIndex index.php


RewriteEngine On


#Clustered setup switch

#RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

#RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.*  /index_image-common.php [L]

       

RewriteCond %{HTTP_HOST} ^webdav\..*

RewriteRule ^(.*) webdav.php [L]



RewriteCond %{HTTP_HOST} ^soap\..*

RewriteRule ^(.*) soap.php [L]


Rewriterule ^/var/static/.* - [L]

RewriteRule ^(.*)favicon\.ico - [L]

RewriteRule ^robots\.txt - [L]

RewriteRule ^sitemap\.xml - [L]

RewriteRule ^var/cache/debug.html.* - [L]

RewriteRule ^var/[^/]+/cache/debug.html.* - [L]

Rewriterule ^var/storage/.* - [L]

Rewriterule ^var/[^/]+/storage/.* - [L]

RewriteRule ^var/cache/texttoimage/.* - [L]

RewriteRule ^var/[^/]+/cache/texttoimage/.* - [L]

RewriteRule ^var/([^/]+/)?cache/public/.* - [L]

Rewriterule ^design/[^/]+/(stylesheets|images|javascript|flash)/.* - [L]

Rewriterule ^share/icons/.* - [L]

Rewriterule ^extension/[^/]+/design/[^/]+/(stylesheets|flash|images|lib|javascripts?)/.* - [L]

Rewriterule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]

RewriteRule ^packages/styles/.+/thumbnail/.* - [L]

# Uncomment the following lines when using popup style debug.

# RewriteRule ^var/cache/debug\.html.* - [L]

# RewriteRule ^var/[^/]+/cache/debug\.html.* - [L] 

RewriteRule .* index.php [L]

Just change all site.ini.append.php files and remove index.php from SiteURL and set the following settings:

[SiteAccessSettings]
ForceVirtualHost=true
RemoveSiteAccessIfDefaultAccess=enabled

Clear the cache.

It's working with 4.4, here's a sample: http://dapp.com.br

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Doug Brethower

Monday 08 November 2010 9:02:06 am

Thanks Thiago, works very nicely on linux hosting.

Still struggling to get it to work on OS X.

Doug Brethower
Apple Certified Technical Consultant, Southwest, MO USA
http://share.ez.no/directory/companies/lakedata.net

Veronique Jamilloux

Tuesday 09 November 2010 9:08:18 am

Hi,

Thank you very much for your answer and sorry for my later reaction but my boss give me an other task most urgent than my web site!!!

I'll try your suggestion at the begin of the next week.

Bye

Véronique

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

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 29 2025 13:41:02
Script start
Timing: Jan 29 2025 13:41:02
Module start 'layout'
Timing: Jan 29 2025 13:41:02
Module start 'content'
Timing: Jan 29 2025 13:41:02
Module end 'content'
Timing: Jan 29 2025 13:41:02
Script end

Main resources:

Total runtime0.0173 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 588.2500151.2266
Module start 'layout' 0.00690.0023 739.476636.6875
Module start 'content' 0.00910.0066 776.164198.8125
Module end 'content' 0.01570.0016 874.976641.9766
Script end 0.0173  916.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002413.7968140.0002
Check MTime0.00116.1829140.0001
Mysql Total
Database connection0.00105.528610.0010
Mysqli_queries0.003218.215230.0011
Looping result0.00000.092310.0000
Template Total0.00126.910.0012
Template load0.00095.355110.0009
Template processing0.00031.519210.0003
Override
Cache load0.00073.767010.0007
General
dbfile0.003218.421980.0004
String conversion0.00000.052340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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