Page 1 of 1

Clean URLs

Posted: Mon Dec 26, 2005 5:56 pm
by gerald
First off a HUGE thanks to the CMSMS authors, developers, and community!!

After wrestling for a long while with trying to get Clean URLs working (500 error), I finally have figured out the problem. In my httpd.conf the mod_rewrite.so  module was NOT set to load when Apache was started...

After uncommenting the following line, making the changes according to the "Clean URLs" tutorial in the Tips & Tricks section of DOCUMENTATION, and restarting Apache, it works as expected.

Code: Select all

#LoadModule rewrite_module modules/mod_rewrite.so
change to:

Code: Select all

LoadModule rewrite_module modules/mod_rewrite.so
Perhaps this should be included in the "Clean URLs" tutorial in the documentation?

Is this something commercial webhosts enable by default? I'm using a local version of Apache, MySQL, PHP and not a commercial webhost for learning this great CMS  ;D

Re: Clean URLs

Posted: Mon Feb 27, 2006 7:09 pm
by stopsatgreen
Unfortunately I don't have access to my httpd.conf, so I can't get clean URLs :(

Re: Clean URLs

Posted: Thu Mar 02, 2006 7:10 pm
by stopsatgreen
Nope. When I change config.php the URLs change to *.html, but as soon as I copy the text from htaccess.txt to .htaccess, I get a 500 server error. Here's how I understand from the instructions what my .htaccess should look like:

Code: Select all

php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag session.use_trans_sid Off

# Make sure you have Options FollowSymLinks
# and Allow on
RewriteEngine On

#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond % !-f [NC]
RewriteRule ^(.+)\.html$ index.php?page=$1 [QSA]
Is that right?

Re: Clean URLs

Posted: Mon Mar 06, 2006 12:25 pm
by stopsatgreen
Just giving this a bump... would appreciate help if available!

Re: Clean URLs

Posted: Mon Mar 06, 2006 1:10 pm
by Ted
There seems to be certain situations where .htaccess can't handle the php_flag stuff.  Try taking those out and see if it helps any.  I wish I had a good explanation as to why it has the problem to begin with.

Re: Clean URLs

Posted: Tue Mar 07, 2006 6:57 pm
by stopsatgreen
That works! Great!

What about clean URLs for News stories?

;)

Re: Clean URLs

Posted: Thu Mar 09, 2006 12:04 pm
by F4n4TiC
Rear ones, well, on my Apache 2,0,52 (Win32) get I to run.  However not on a Apache 2,0,48 (Linux/Suse)!!!  What can lie???    :( ???

Re: Clean URLs

Posted: Mon Mar 13, 2006 6:23 pm
by URAN
I`ve read messages at this topic and just wonder if this "mod rewrite" will make my pages looks like .html or .shtml...

Where this module is?  ???

How to activate it?  ???

How to make sure that it works?  ???

Help me, please

Re: Clean URLs

Posted: Wed Mar 15, 2006 6:19 pm
by Tom
URAN wrote: I`ve read messages at this topic and just wonder if this "mod rewrite" will make my pages looks like .html or .shtml...

Where this module is?  ???

How to activate it?  ???

How to make sure that it works?  ???

Help me, please
Yes, mod_rewrite module is a precondition to have the .html or any other static-looking files, together with the right .htaccess file, which for CMSMS you can find in DOC folder, copy to root folder and rename to .htaccess.
Most good webhosting services have mod_rewrite installed and turned on by default, ask your hosting company.