Page 1 of 1

Pretty URL's - Multiple Choices [SOLVED]

Posted: Tue Oct 05, 2010 7:35 pm
by peterbisset
Hi,

I am having some difficulty configuring Pretty URL's, I get a page that states "Multiple Choices
The document name you requested (/index.php) could not be found on this server. However, we found documents with names similar to the one you requested.

Available documents:

   * /index.html?page=default-extensions.html (common basename)

Please consider informing the owner of the referring page about the broken link."

config.php:

Code: Select all

$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'page';
.htaccess:

Code: Select all

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
#Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /

#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
Please can someone help?

Thanks,
Peter

Re: Pretty URL's - Multiple Choices

Posted: Wed Oct 06, 2010 11:27 am
by spike
I am not an expert ! this is what I have - maybe you want to try it.

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !\.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).html$ index.php?page=$1 [QSA]

Re: Pretty URL's - Multiple Choices

Posted: Wed Oct 06, 2010 2:39 pm
by peterbisset
Thanks for trying but that has had no affect and I am still getting the same page with the Multiple Choice error, any other suggestions?

Re: Pretty URL's - Multiple Choices

Posted: Wed Oct 06, 2010 5:31 pm
by Dr.CSS
I've never had a problem getting true pretty URLs setting the config.php as you have and using the htaccess.txt found in the [root]/doc folder, move it to the [root] and rename it .htaccess ...

Re: Pretty URL's - Multiple Choices

Posted: Thu Oct 07, 2010 1:35 pm
by peterbisset
If I use the htaccess.txt file in the /doc folder and convert this to a .htaccess file in the root I get the following error:

"Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /homepages/4/d328791089/htdocs/cms/lib/page.functions.php on line 1395"

If it helps the url for the website that I am using as a test domain is: http://s328791098.websitehome.co.uk/cms/

Thanks,
Peter

Re: Pretty URL's - Multiple Choices

Posted: Thu Oct 07, 2010 3:27 pm
by Dr.CSS
If you change $config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6

 to

$config['url_rewriting'] = 'none';

does the error go away?...

Re: Pretty URL's - Multiple Choices

Posted: Thu Oct 07, 2010 5:19 pm
by peterbisset
I just tried that, unfortunately it hasn't made any difference.

Re: Pretty URL's - Multiple Choices

Posted: Thu Oct 07, 2010 7:37 pm
by Dr.CSS
That has nothing to do with URLs it seems your host changed something or you are trying to run the wrong version for the PHP you have or... ?

We would need your system information, CMSMS ver., PHP ver. etc., to be of anymore help...

Re: Pretty URL's - Multiple Choices

Posted: Sun Oct 10, 2010 3:59 pm
by peterbisset
PHP Version 5.2.14

CMSMS Version 1.8.2

Hosts: 1and1 Linux Server

Anything else you need to know?

Re: Pretty URL's - Multiple Choices

Posted: Sun Oct 10, 2010 8:22 pm
by Dr.CSS
It actually says you are running PHP 5.2.14 in your system information page?...

Sometimes a host may say it is running one thing when it actually runs another, iirc with 1&1 you may have to actually tell it to use the 5.2.14...

Re: Pretty URL's - Multiple Choices

Posted: Sun Oct 10, 2010 10:26 pm
by peterbisset
I created a page with to check the PHP version using:



The page i uploaded it to is: http://s328791098.websitehome.co.uk/cms/testing.php. This should confirm that my server is running PHP 5.2.14, is that correct?

Re: Pretty URL's - Multiple Choices

Posted: Mon Oct 11, 2010 5:24 pm
by Dr.CSS
What does it say in the system information page?...

Re: Pretty URL's - Multiple Choices

Posted: Mon Oct 11, 2010 6:22 pm
by peterbisset
The system information page says:

Current PHP Version (phpversion): 5.2.14

Re: Pretty URL's - Multiple Choices

Posted: Mon Oct 18, 2010 8:58 am
by peterbisset
Does anyone have a solution to this please?