Page 1 of 1
mod_rewrite and menu help
Posted: Mon Feb 04, 2008 4:54 pm
by chiggeybean
I am semi-desperate need of some help with mod_rewrite in relation to cmsms and some menu customization as well. Please contact vgarcia@*nospam*jscc.edu with your terms. As is usual with this sort of thing, I'm in a hurry to fix problems I've created for myself.
Re: mod_rewrite and menu help
Posted: Thu Feb 07, 2008 4:52 pm
by chiggeybean
I don't need the menu help any more, but the mod_rewrite issues are still important. Doesn't anyone want to make a little money?
Re: mod_rewrite and menu help
Posted: Sat Feb 09, 2008 5:40 pm
by casidougal
The following works for me in most Linux-Apache environments:
1. Open the attached rename me.txt file a pure text editor like Windows notepad (if you don't it may be corrupted). Change the mydomain to the name of yours and change .com to .org if applicable. Change the name of the file to ".htaccess", make sure notepad does not add .txt to the end of it. As you may know, the ".htaccess" file has no file name just the extension .htaccess.
2. You should have a config.php file in the root directory of your CMSMS install. Back it up, then look for the URL settings section. Match your settings to what you see below. You can change the extension to whatever . . . .htm, .html or .php
3.Upload the .htaccess and config.php files to your sites root directory. Rewrites should work. If you get 500 errors simply delete .htaccess and restore to the backed up config.php file. If it does not work ask your hosting provider what is required for modrewrites. If you try it again with different mod rewrite commands just remember to make the changes in config.php again.
No charge for this, but if it works consider donating a few bucks to CMS Made Simple:
http://www.cmsmadesimple.org/about-us/donations
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'] = '.php';
#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'] = 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'
Re: mod_rewrite and menu help
Posted: Wed Feb 13, 2008 10:27 pm
by chiggeybean
thanks. But I have mod_rewrite working perfectly according to the tutorial. I was looking for some customization advice and still willing to pay.