Page 1 of 1

Pretty URLs in 1.10.2 giving 404 error

Posted: Mon Dec 12, 2011 4:43 am
by twwitt
Hi -- I've looked through the forum to see if I can find what might be wrong with my pretty urls, but can't, so...

I've done a clean install of 1.10.2..all is fine. But after changing config.php and adding .htaccess, I can't get pretty urls to work. Keeps giving me a 404 error message.

I've done pretty urls before on earlier versions of CMSMS and haven't had problems, so wondering if I've done something wrong with 1.10.2. I noticed the config.php is different, but I added the lines as noted in the CMSMS Config Variables pdf document:
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';

My CMS is not in a subdirectory.

In the admin's system information list, everything seems to be fine.

This is a new host to me, but all has gone well up until now. If I were to ask my host a question, what would it be? Something about turning on mod_rewrite? (There's nothing listed when I look at phpinfo.php).

Re: Pretty URLs in 1.10.2 giving 404 error

Posted: Mon Dec 12, 2011 9:04 am
by JiiPee
Hi.
I just finnished one site with this new 1.10.2 and started to wonder also about pretty url option, since config file is totally changed.

I got it working with no problem, just added these three lines in the config file, make sure to add them before ?>:
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['query_var'] = 'page';

and then uploaded htaccess file:

Code: Select all

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

[code]
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
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
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>[/code]

Re: Pretty URLs in 1.10.2 giving 404 error

Posted: Mon Dec 12, 2011 9:17 am
by gianpiero
Buddy suggestion: when I make modification to config.php I'm cleaning Cache always
bye
gp

Re: Pretty URLs in 1.10.2 giving 404 error

Posted: Mon Dec 12, 2011 4:03 pm
by twwitt
Thanks for the responses, but so far neither of those things have helped.

I'm thinking maybe it has to do with this new web host? But I'm not sure what to ask them in terms of settings on their side...

Re: Pretty URLs in 1.10.2 giving 404 error

Posted: Mon Dec 12, 2011 6:18 pm
by Dr.CSS
First thing to do is make sure they don't have a hidden htaccess file in the root...

Re: Pretty URLs in 1.10.2 giving 404 error

Posted: Mon Mar 05, 2012 9:53 am
by Mats Helge
Hi, did you get your system working already twwitt? I'm having the same problem with the pretty url's. Just don't seem to get it to work on any of the ways offered here and for example here:
http://forum.cmsmadesimple.org/viewtopi ... 6&p=266779

Would appreciate a "how-to-pretty-url's-for-dummies" -tutorial that describes step-by-step the way to get it to work on the newest cmsms releases.

Thanks!