SOLVED: Removing "index.php?"

Author Message

Mike Hannibal

Tuesday 28 October 2008 7:26:45 pm

HI,

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):

www.pacificlightaircraft.com.au/index.php?/whatever/whatever

Instead of:

www.pacificlightaircraft.com.au/whatever/whatever

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 ;-). 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

Mike

Mike Hannibal

Tuesday 28 October 2008 11:49:48 pm

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

Mike

Andrew Duck

Wednesday 29 October 2008 12: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.

ForceVirtualHost=true

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.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Mike Hannibal

Wednesday 29 October 2008 1: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

Mike

Andrew Duck

Wednesday 29 October 2008 1:18:16 am

Mike,

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?

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Mike Hannibal

Wednesday 29 October 2008 1:23:01 am

G'day Andrew,

I didn't check the URL ;-)

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?

Regards

Mike

Andrew Duck

Wednesday 29 October 2008 1: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.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Mike Hannibal

Wednesday 29 October 2008 1:48:59 am

Many thanks Andrew,

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

Regards

Mike

Yannick Komotir

Wednesday 29 October 2008 9:04:02 am

Hi,
you can also see this here http://ez.no/doc/ez_publish/technical_manual/4_0/installation/virtual_host_setup/virtual_host_example

Yannick_

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Mike Hannibal

Friday 07 November 2008 8:24:54 pm

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

Mike

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.