Page 1 of 1

htaccess assume_mod_rewrite true not working

Posted: Fri Jan 04, 2008 12:53 am
by giggler
When assume_mod_rewrite is set to true, the sub pages redirects to the root of the domain. Using internal pretty url does work, but i don't want to use /index.php/file-name.html.

Currently, site is in the sub folder /cms/. I've tried reading all other post regarding mod_rewrite. Does this just come down to server (php) setting. The same host with another test on a different server is working fine. argghh..

Code: Select all

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

#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; (tried both true and 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';
htaccess:

Code: Select all

<IfModule mod_rewrite.c>

  # Enable URL rewriting
Options +FollowSymLinks (also tried with and without this)
RewriteEngine on
RewriteBase /cms/


#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ /cms/index.php?page=$1 [QSA]

</IfModule>

Re: htaccess assume_mod_rewrite true not working

Posted: Fri Jan 04, 2008 1:14 am
by Dr.CSS
I don't know about the , don't think it's needed but you may want to try it with out the / at the end of /cms/...

Read this, from googling... not sure it will help...

http://www.javascriptkit.com/howto/htaccess.shtml