This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Install & configuration » SOLVED: Removing "index.php?"

SOLVED: Removing "index.php?"

SOLVED: Removing "index.php?"

Wednesday 29 October 2008 3:26:45 am - 9 replies


I've searched the documentation and the forum without success for a solution to this.

I have a site with three siteaccesses and with a virtual host setup that directs where the user comes in.

How do I stop the site from returning (for instance):

Instead of:

The inclusion of the index.php? is causing problems with Google and in particular with sitemaps generating 404 errors with Google's bot.

I am not very technical so I would appreciate help with perhaps a little more explanation than normal!

I find the documentation on URL aliasing totally unintelligible - but that may well just be me blunk.gif Emoticon. It may be that the answer is in there but I can't work it out.

Installation is ezPublish 4.0.1 and it was a fresh installation. I don't have access to the virtual host setup on Apache - I had to get tech support to do a one-off setup.

Kind regards


Modified on Saturday 08 November 2008 5:32:00 am by Mike Hannibal

Wednesday 29 October 2008 7:49:48 am

I also have a further question:

From the backend ezwebin_site_admin I entered a URL wildcard alias. This alias was _wrong_ and I now have no access to the backend as the alias directs me into a black hole!

I have been into the database and deleted the alias - single row from the table ezurlwildcard

However this does not solve the problem. I cannot clear the cache from the admin area because it fails on the redirection.

Can someone suggest how I might solve this issue.

Many thanks


Wednesday 29 October 2008 8:13:56 am

Hi Mike,

To answer your first question there is a lot of posts on the forums about removing index.php from your URLs. If you have the virtualhost configured correctly then add the following to settings/override/site.ini in the [SiteAccessSettings] block.


In regards to clearing the cache. From the command line you can run:

bin/php/ezcache.php --clear-all --purge

from the main directory of your eZ Publish installation.

Wednesday 29 October 2008 9:00:32 am

G'day Andrew,

thanks for that quick response. The clear cache trick solved the problem.

However setting force virtual host resulted in this:

The requested page could not be displayed. (20)

The requested address or module could not be found.

Possible reasons:

    * The address was misspelled. Try changing the URL.
    * The name of the module was misspelled. Try changing the URL.
    * There is no <index.php> module available on this site.
    * The site is using URL matching to determine which siteaccess to use, but the name of the siteaccess is missing from the URL. Try to add the name of the siteaccess; it should be specified before the name of the module.

I'm not sure where that problem lies - is it in the Virtual Hosts settings or in my siteaccess?

Kind regards


Wednesday 29 October 2008 9:18:16 am


When you receive the kernel(20) error what was the URL in your address bar?

This is likely an error with your rewrite rules in the VirtualHost configuration. Can you provide a copy of the current virtualhost config?

Wednesday 29 October 2008 9:23:01 am

G'day Andrew,

I didn't check the URL blunk.gif Emoticon

I don't have access to the Virtual Host setup - it's shared hosting and I can't access - or indeed influence the settings. I provided a requested VH set up based on the documentation however I don't know whether it was implemented. I think tech support feels that it knows best!

What do I need to ask for in the VH setup to fix this situation?



Wednesday 29 October 2008 9:32:56 am

RewriteEngine On

RewriteRule content/treemenu/? index_treemenu.php
RewriteRule index_treemenu.php - [L]
RewriteRule !\.(gif|jpe?g|png|flv|swf|ico|html|htm|css|js)|var(.+)storage.pdf(.+
)\.pdf$ index.php

DirectoryIndex index.php

The above should cover the basic installation fine. There are a number of more complex rules you can find scattered throughout the documentation and forums depending on specific needs but give this a go first.

Wednesday 29 October 2008 9:48:59 am

Many thanks Andrew,

I'll work through this with tech support tomorrow and see how I go.



Wednesday 29 October 2008 5:04:02 pm

you can also see this here


Saturday 08 November 2008 5:24:54 am

Thanks for all the assistance on the forum with this problem and also the kind assistance of Norman Leutner.

After over a week of trying I have completely failed to get tech support to provide a decent vhosts setup to solve this problem.

Finally I resorted to Norman's suggestion and edited the site URL in Look & Feel to include "index.php?". This immediately solved the Google sitemap crawl issue.

Many thanks to everyone for their assistance.

Kind regards



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

36 542 Users on board!

Forums menu

Proudly Developed with from