Forums / Install & configuration / URL without siteaccess name

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

eZ debug

Timing: Jan 28 2025 22:13:58
Script start
Timing: Jan 28 2025 22:13:58
Module start 'content'
Timing: Jan 28 2025 22:13:58
Module end 'content'
Timing: Jan 28 2025 22:13:58
Script end

Main resources:

Total runtime0.2609 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.1797180.8359
Module start 'content' 0.00650.0080 770.0156102.5547
Module end 'content' 0.01440.2464 872.5703530.6797
Script end 0.2608  1,403.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00321.2307200.0002
Check MTime0.00130.5124200.0001
Mysql Total
Database connection0.00050.198610.0005
Mysqli_queries0.212981.61331410.0015
Looping result0.00120.47491390.0000
Template Total0.246094.310.2460
Template load0.00080.315410.0008
Template processing0.245293.975910.2452
Override
Cache load0.00060.216910.0006
Sytem overhead
Fetch class attribute can translate value0.00050.205810.0005
XML
Image XML parsing0.00040.145710.0004
General
dbfile0.01064.0438200.0005
String conversion0.00000.002730.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