Hi all,
Think i need your help...
I have a prob with the pretty URL mechanism, i use CMSMS 1.06 on a linux server.
The menu links automatically adopt the pretty url mechanism, but when the link is clicked, there is a 404 error.
Example of the site: http://www.e-asy.nl.
If i put /index.php/ between the root URL and the link everything works fine.
For example : http://www.e-asy.nl/index.php/etcetcetc.
i implemented the following .htaccess:
Options +FollowSymLinks
RewriteEngine on
# 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 [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule (.*) index.php?page=$1 [QSA]
RewriteRule ^index.php$ index.php
My config.php:
#------------
#URL Settings
#------------
#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;
#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '';
#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism? This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true;
#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = false;
#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
Can anybody help me pls??
Pretty URL not working correctly, help desperately wanted - SOLVED
Pretty URL not working correctly, help desperately wanted - SOLVED
Last edited by hamood on Wed Jun 06, 2007 8:15 pm, edited 1 time in total.
Offline marketing sucks !
Re: Pretty URL not working correctly, help desperately wanted
Try to change your
RewriteRule (.*) index.php?page=$1 [QSA]
RewriteRule ^index.php$ index.php
to
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
and I think it should work then.
RewriteRule (.*) index.php?page=$1 [QSA]
RewriteRule ^index.php$ index.php
to
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
and I think it should work then.
Re: Pretty URL not working correctly, help desperately wanted
Hi Mooni,
thx for the swift reply
I implemented the change into .htaccess but still the same prob....
with /index.php/etcetc it works, without it does not work...
thx for the swift reply

I implemented the change into .htaccess but still the same prob....
with /index.php/etcetc it works, without it does not work...
Offline marketing sucks !
Re: Pretty URL not working correctly, help desperately wanted
Have you look herehamood wrote:
I implemented the change into .htaccess but still the same prob....
with /index.php/etcetc it works, without it does not work...
Alby
Re: Pretty URL not working correctly, help desperately wanted
Thanks Alby,
I tried that, backspacing etc; also i first put the .htaccess in a .txt file, renamed it to .htaccess but this does not work too.
I tried that, backspacing etc; also i first put the .htaccess in a .txt file, renamed it to .htaccess but this does not work too.
Offline marketing sucks !
Re: Pretty URL not working correctly, help desperately wanted
Since you're using mod_rewrite, I think you should change this:
#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism? This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true; <---- change to false
Nullig
#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism? This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true; <---- change to false
Nullig
Re: Pretty URL not working correctly, help desperately wanted - SOLVED
Hi, i really do not know why but the default insertion of the .htaccess did not work for me.
An 'apache & php' specialiast i know had a look at this file and he changed it into:
Options +FollowSymLinks
RewriteEngine on
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !/.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ /index.php?page=$1 [QSA]
# RewriteRule ^index.php$ / [r=301,l]
# RewriteRule ^page/(.+)$ /index.php?page=$1
Works fine now!
Thanks for the help anyway
An 'apache & php' specialiast i know had a look at this file and he changed it into:
Options +FollowSymLinks
RewriteEngine on
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !/.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ /index.php?page=$1 [QSA]
# RewriteRule ^index.php$ / [r=301,l]
# RewriteRule ^page/(.+)$ /index.php?page=$1
Works fine now!
Thanks for the help anyway

Offline marketing sucks !