Forums / Install & configuration / URL without siteaccess name
Veronique Jamilloux
Saturday 06 November 2010 8:45:44 am
Hi,
My Exponential 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
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.
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
Tuesday 09 November 2010 9:08:18 am
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