How to set pretty url in 1.6.9?[resolved]

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
User avatar
ethan2cyc
Forum Members
Forum Members
Posts: 28
Joined: Sun Jan 09, 2011 1:29 pm

How to set pretty url in 1.6.9?[resolved]

Post 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
Last edited by ethan2cyc on Tue Mar 08, 2011 6:34 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: How to set pretty url in 1.6.9?

Post by calguy1000 »

CMSMS 1.6.9 is unsupported. Please use 1.9.x
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
ethan2cyc
Forum Members
Forum Members
Posts: 28
Joined: Sun Jan 09, 2011 1:29 pm

Re: How to set pretty url in 1.6.9?

Post by ethan2cyc »

but the wiki say it can and the config.php has such options.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: How to set pretty url in 1.6.9?

Post 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.
User avatar
ethan2cyc
Forum Members
Forum Members
Posts: 28
Joined: Sun Jan 09, 2011 1:29 pm

Re: How to set pretty url in 1.6.9?

Post 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.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: How to set pretty url in 1.6.9?

Post 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.
User avatar
ethan2cyc
Forum Members
Forum Members
Posts: 28
Joined: Sun Jan 09, 2011 1:29 pm

Re: How to set pretty url in 1.6.9?

Post by ethan2cyc »

:'(
any one else can help me?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: How to set pretty url in 1.6.9?

Post 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...
User avatar
ethan2cyc
Forum Members
Forum Members
Posts: 28
Joined: Sun Jan 09, 2011 1:29 pm

Re: How to set pretty url in 1.6.9?

Post 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.
Locked

Return to “[locked] Installation, Setup and Upgrade”