[SOLVED] Getting Rid of index.php/
Posted: Wed Jun 07, 2006 8:07 pm
Hello. I was wondering if I might have some expert minds help me out on my issue of clean url's.
Currently, for any directory, such as http://mydomainname.com/index.php/home or http://mydomainname.com/index.php/about, I'm getting the annoying "index.php/" put in between the domain name and the alias for the folder name. The only other topic dealing with this same issue had someone that had unique settings in their mod-rewrite server file (or something like that), so I wasn't able to gain anything from there.
My .htaccess and config.php files are set according to the instructions listed in cmsmadesimple.org and in various forum entries, as seen below, along with the {metadata} tag in all my templates.
My .htaccess file on the root folder reads as follows:
______________
#Config for CMS
RewriteEngine On
Rewrite Base /
# 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]
___________________
My config.php file reads as follows:
___________________
#------------
#URL Settings
#------------
#Show mod_rewrite URLs in the menu?
$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'] = 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';
_________________________
Any ideas as to what might be happening and what would be my next step? Really appreciate the help!!
Rob
Currently, for any directory, such as http://mydomainname.com/index.php/home or http://mydomainname.com/index.php/about, I'm getting the annoying "index.php/" put in between the domain name and the alias for the folder name. The only other topic dealing with this same issue had someone that had unique settings in their mod-rewrite server file (or something like that), so I wasn't able to gain anything from there.
My .htaccess and config.php files are set according to the instructions listed in cmsmadesimple.org and in various forum entries, as seen below, along with the {metadata} tag in all my templates.
My .htaccess file on the root folder reads as follows:
______________
#Config for CMS
RewriteEngine On
Rewrite Base /
# 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]
___________________
My config.php file reads as follows:
___________________
#------------
#URL Settings
#------------
#Show mod_rewrite URLs in the menu?
$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'] = 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';
_________________________
Any ideas as to what might be happening and what would be my next step? Really appreciate the help!!
Rob