Page 1 of 1

Pretty URLs work but i cant get rid of index.php

Posted: Tue Nov 21, 2006 3:46 pm
by funkdaweb
Hi i have used CMSMS for quite a while now and have recently started turning the pretty urls on. I have got this to work purfectly on 3 website but for some reason on the current site im working on it does not work!

Im using CMSMS v1.0.2 with MySQL 5.0.20a & PHP 4.4.4

here the section from my config file...

Code: Select all

#------------
#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'] = '.htm';

#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'] = false;

#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'] = true;

#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';

here is the htaccess file...

Code: Select all

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 [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
i have absolutly no idea why we are having the problems! the only thing i can think is its something to do with the fact the URL is not yet pointing to the server and we are using a temp URL but the cms installed properly and works fine with using 'index.php?page='

any help would be appriciated!

Re: Pretty URLs work but i cant get rid of index.php

Posted: Tue Nov 21, 2006 5:26 pm
by Ted
You're getting the index.php/somepage url scheme with that config?  Or it's just ignoring it and using index.php?page=somepage?

Re: Pretty URLs work but i cant get rid of index.php

Posted: Tue Nov 21, 2006 5:32 pm
by funkdaweb
i get the urls to look like this.... www.domain.com/index.php/page_home.htm

but want them to look like this.... www.domain.com/page_home.htm

Re: Pretty URLs work but i cant get rid of index.php

Posted: Tue Nov 21, 2006 5:36 pm
by Ted
Just looking at the logic of the code.  It's most definitely looking at the assume_mod_rewrite parameter first.

Maybe try clearing the cache, just in case something is gummed up somewhere.

Re: Pretty URLs work but i cant get rid of index.php

Posted: Tue Nov 21, 2006 5:45 pm
by funkdaweb
i know! its getting reet on my nerves!  :(

tried clearing cache before with no look!

Re: Pretty URLs work but i cant get rid of index.php

Posted: Fri Nov 24, 2006 3:58 pm
by funkdaweb
anybody have an idea on this? still cant fix the problem!