eZ Community » Forums » Install & configuration » Using MatchOrder=uri & removing...
expandshrink

Using MatchOrder=uri & removing index.php from the URL

Using MatchOrder=uri & removing index.php from the URL

Tuesday 31 January 2012 3:05:57 am - 2 replies

Hey,
I know there are a million forum posts about removing "index.php" from the URL, but none seem to match the senario I have.

Say I have 4 siteaccess': defaultsite, subsite, mobilesite and cmsadmin

I don't want to use subdomains (Virtual host method) to access the siteaccess (eg. subsite.domain.com.au) Why? you may ask...Basically the client has requested it to work this way.

So currently I can access the siteaccess' using:
www.domain.com.au/index.php/defaultsite/
www.domain.com.au/index.php/cmsadmin/

So is there a way of removing the index.php from the URL, while still using the "MatchOrder=uri" method of accessing the different siteaccess? So it would work like:
www.domain.com.au/cmsadmin/
www.domain.com.au/mobilesite/ 

Thanks for any help in advance!

Josh

Tuesday 31 January 2012 9:18:14 am

Hi,

yes you can, try setting

[SiteAccessSettings]
RemoveSiteAccessIfDefaultAccess=enabled
ForceVirtualHost=true

Sinisa

Thursday 02 February 2012 2:23:35 am

This doesn't work. I think to use "ForceVirtualHost=true" you actually have to be using separate domains for each siteaccess.

Although I did give your suggestion a go, and this is what I have in my .htaccess file:

DirectoryIndex index.php 

RewriteEngine On

RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) webdav.php [L] 
RewriteCond %{HTTP_HOST} ^soap\..*
RewriteRule ^(.*) soap.php [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 ^design/[^/]+/(stylesheets|images|javascript)/.* - [L]
Rewriterule ^share/icons/.* - [L]
Rewriterule ^extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule .* index.php [L]

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from