Pretty URL's - Multiple Choices [SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
peterbisset

Pretty URL's - Multiple Choices [SOLVED]

Post 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
Last edited by peterbisset on Fri May 06, 2011 12:51 pm, edited 2 times in total.
spike
Forum Members
Forum Members
Posts: 153
Joined: Thu Sep 25, 2008 5:02 pm

Re: Pretty URL's - Multiple Choices

Post 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]
peterbisset

Re: Pretty URL's - Multiple Choices

Post 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?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URL's - Multiple Choices

Post 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 ...
peterbisset

Re: Pretty URL's - Multiple Choices

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URL's - Multiple Choices

Post 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?...
peterbisset

Re: Pretty URL's - Multiple Choices

Post by peterbisset »

I just tried that, unfortunately it hasn't made any difference.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URL's - Multiple Choices

Post 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...
peterbisset

Re: Pretty URL's - Multiple Choices

Post by peterbisset »

PHP Version 5.2.14

CMSMS Version 1.8.2

Hosts: 1and1 Linux Server

Anything else you need to know?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URL's - Multiple Choices

Post 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...
peterbisset

Re: Pretty URL's - Multiple Choices

Post 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?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URL's - Multiple Choices

Post by Dr.CSS »

What does it say in the system information page?...
peterbisset

Re: Pretty URL's - Multiple Choices

Post by peterbisset »

The system information page says:

Current PHP Version (phpversion): 5.2.14
peterbisset

Re: Pretty URL's - Multiple Choices

Post by peterbisset »

Does anyone have a solution to this please?
Locked

Return to “CMSMS Core”