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 17 2025 20:54:36
Script start
Timing: Jan 17 2025 20:54:36
Module start 'content'
Timing: Jan 17 2025 20:54:37
Module end 'content'
Timing: Jan 17 2025 20:54:38
Script end

Main resources:

Total runtime1.1476 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0089 597.2813180.8359
Module start 'content' 0.00891.0352 778.1172719.9063
Module end 'content' 1.04410.1034 1,498.0234341.3047
Script end 1.1475  1,839.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3056210.0002
Check MTime0.00130.1149210.0001
Mysql Total
Database connection0.00090.080910.0009
Mysqli_queries1.058192.19492080.0051
Looping result0.00170.14962060.0000
Template Total1.109196.620.5545
Template load0.00160.135920.0008
Template processing1.107596.503120.5538
Template load and register function0.00010.007610.0001
states
state_id_array0.00110.094410.0011
state_identifier_array0.00100.091420.0005
Override
Cache load0.00140.1206460.0000
Sytem overhead
Fetch class attribute can translate value0.00090.078050.0002
Fetch class attribute name0.00100.0902100.0001
XML
Image XML parsing0.00430.374950.0009
class_abstraction
Instantiating content class attribute0.00000.0016120.0000
General
dbfile0.01040.9056460.0002
String conversion0.00000.000530.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 9

Time used to render debug report: 0.0002 secs