Page 1 of 1

How to set pretty url in 1.6.9?[resolved]

Posted: Wed Mar 02, 2011 2:37 pm
by ethan2cyc
I have followed the wiki page, but it can not work well.

the config.php

Code: Select all

$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '';

#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';
the .htaccess copy from the doc/htaccess.txt

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"

#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
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#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>
the httpd.conf

Code: Select all

LoadModule rewrite_module modules/mod_rewrite.so

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
is there any more to config?

when I've done these, the url " http://localhost/cmsms-1.6.9/index.php?page=alias-4 " has changed to " http://localhost/cmsms-1.6.9/alias-4.html ", but the problem is the page do not show the right content! It show the same content as " http://localhost/ ".
I have try many times and a lot of ways but it still doesn't work.

php 5.1.1
apache 2.0.63
cmsm 1.6.9

Re: How to set pretty url in 1.6.9?

Posted: Wed Mar 02, 2011 2:40 pm
by calguy1000
CMSMS 1.6.9 is unsupported. Please use 1.9.x

Re: How to set pretty url in 1.6.9?

Posted: Thu Mar 03, 2011 8:29 am
by ethan2cyc
but the wiki say it can and the config.php has such options.

Re: How to set pretty url in 1.6.9?

Posted: Thu Mar 03, 2011 2:53 pm
by Wishbone
You got .html when your page_extension is blank ?

Just for the fun of it, install the latest CMSMS version on the side, and see if it works for you. If not, we know it has nothing to do with the version.

Re: How to set pretty url in 1.6.9?

Posted: Fri Mar 04, 2011 5:50 am
by ethan2cyc
Wishbone wrote:You got .html when your page_extension is blank ?
no, when the page_extension is blank, the url do no have .html.
Wishbone wrote: Just for the fun of it, install the latest CMSMS version on the side, and see if it works for you. If not, we know it has nothing to do with the version.
The latest version do not work either.

Re: How to set pretty url in 1.6.9?

Posted: Fri Mar 04, 2011 5:56 am
by Wishbone
ethan2cyc wrote:The latest version do not work either.
Ahh.. Now Calguy can help you ;)

Does your apache install have mod-rewrite turned on? Can you confirm by testing out some mod-rewrite function? I'm no mod-rewrite expert.. I just follow the pretty-url instructions, and it works on the hosts that I use.

Re: How to set pretty url in 1.6.9?

Posted: Fri Mar 04, 2011 3:58 pm
by ethan2cyc
:'(
any one else can help me?

Re: How to set pretty url in 1.6.9?

Posted: Mon Mar 07, 2011 7:04 pm
by Dr.CSS
Is this a localhost install on your computer using xampp or some such?...

If so you need to add the folder name to the .htaccess where it says...

RewriteBase /
RewriteBase /cmsms-1.6.9

And if it is an xampp type install you might as well upgrade it and your cmsms install to the latest...

Re: How to set pretty url in 1.6.9?

Posted: Tue Mar 08, 2011 6:33 am
by ethan2cyc
Dr.CSS wrote:
RewriteBase /
RewriteBase /cmsms-1.6.9

And if it is an xampp type install you might as well upgrade it and your cmsms install to the latest...

thank you!! I've resolved it.