Pretty URL in 1.8.2?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
chawkins24
New Member
New Member
Posts: 9
Joined: Wed Jun 17, 2009 2:35 pm

Pretty URL in 1.8.2?

Post by chawkins24 »

I'm trying to use Pretty URL's in version 1.8.2 with little to no success.

I was able to amend the URL settings:

Code: Select all

#------------
#URL Settings
#------------

#What type of URL rewriting should we be using for pretty URLs?  Valid options are:
#'none', 'internal', and 'mod_rewrite'.  'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates.  For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';

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

#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';
From here I proceeded to take the htaccess.txt from the /doc directory and replace the existing .htaccess file.

This allowed my page extensions and url to change to eg http://test.com/test.htm but this page was throwing up an error saying it could not be found. The page is still available under the default http://test.com/index.php?page=test.


Does anyone have any insight into where I'm going wrong?

Thanks

Chris
ngoncom
Forum Members
Forum Members
Posts: 19
Joined: Fri Jun 11, 2010 7:55 am

Re: Pretty URL in 1.8.2?

Post by ngoncom »

Ok!

Have you upload ".htaccess" file to root path yet?

File .htaccess you can get at "docs" folder when download code.

Or you can get

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 /

# Redirect to canonical domain name without www
# RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com$ [NC]
# RewriteRule ^(.*) http://yourdomain.com/$1 [L,R=301]

#
# 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>
Save above code to ".htaccess" and upload to root.

If you install CMCMS on sub folder, you have to change "RewriteBase /" to "RewriteBase /subfolder" (with "subfolder" is your sub folder you installed CMCMS)

Hope this help!
Jude
Forum Members
Forum Members
Posts: 31
Joined: Fri Aug 08, 2008 2:01 pm

Re: Pretty URL in 1.8.2?

Post by Jude »

I lost my pretty URL's too after upgrading to 1.8.2  :-(

I have uploaded the file ect. ect. but it doesn't work. So, what should I do?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URL in 1.8.2?

Post by Dr.CSS »

System info please, from system info page in admin...
User avatar
barboni
Forum Members
Forum Members
Posts: 68
Joined: Thu Nov 30, 2006 7:56 pm

Re: Pretty URL in 1.8.2?

Post by barboni »

Here I come again with URL issue.
While using 1.8.2 my pretty URL had no extension and worked fine. Then I decided to use .html extension, but I also ended with page not found error. So, I had to go back to slash. Then it worked fine again.

Then I upgraded to 1.9 (with lot of trouble) and couldn't wait to try content URL feature, but unfortunately those URL's didn't work - Not found again! I tried it with blog articles (blog/the-title-of-the-article, and with standard content, always the same...

CMS Version
1.9

Installed Modules
CMSMailer
2.0
FileManager
1.0.3
MenuManager
1.7
ModuleManager
1.4
News
2.11
nuSOAP
1.0.2
Printing
1.1.1
Search
1.6.6
ThemeManager
1.1.2
TinyMCE
2.8.0
Banners
2.3.6
Bookmarks
2.0.1
Captcha
0.4.3
CGExtensions
1.21
CGFeedMaker
1.0.11
CompanyDirectory
1.6.8
ContentAliases
0.6.11
IE6Warning
1.03
JQueryTools
1.0.10
CGBlog
1.6.3
linkmanager
0.3
MailTrain
1.0
Glossary
0.6.8
MyFavorites
1.0
GBFilePicker
1.1
SimpleSlider
0.3
Uploads
1.11.5
Vacations
1.0
Cataloger
0.8.0
FormBuilder
0.6.4
CGSimpleSmarty
1.4.5
FrontEndUsers
1.12.5
Gallery
1.4.1
HostedVideoAlbums
2.0.1
CGContentUtils
1.0.3
seminarplan
0.14
ServiceDesk
0.1.0
ShareItPop
0.1
simpletagging
0.2.1
youtubeplayer
1.3
Cron
0.0.2
NeoModule
0.2.7
NeoDataStorage
0.2.3
NeoBackup
0.1.0
OpenSSL
0.3
ScriptDeploy
0.7.7
SEOTools
1.1
SystemInfo
1.0
CGSMS
1.0
FormBrowser
0.3.2
CGFeedback
1.2.1

Config Information
php_memory_limit:
64M
process_whole_template:
false
output_compression:
true
max_upload_size:
64000000
default_upload_permission:
664
url_rewriting:
mod_rewrite
page_extension:

query_var:
page
image_manipulation_prog:
GD
auto_alias_content:
true
locale:

default_encoding:
utf-8
admin_encoding:
utf-8
set_names:
true
debug:
false
root_url:
http://www.site.rs
ssl_url:
https://www.site.rs
root_path:
/home/site/public_html (0750)
previews_path:
/home/site/public_html/tmp/cache (0755)
uploads_path:
/home/site/public_html/uploads (0755)
uploads_url:
http://www.site.rs/uploads
image_uploads_path:
/home/site/public_html/uploads/images (0755)
image_uploads_url:
http://www.site.rs/uploads/images
ssl_uploads_url:
/uploads
use_smarty_php_tags:
false
PHP Information:
Current PHP Version (phpversion):
5.2.14
md5 function (md5_function):
On (True)
GD version (gd_version):
2
tempnam function (tempnam_function):
On (True)
Magic quotes in runtime (magic_quotes_runtime):
Off (False)
Is E_STRICT disabled in error_reporting (E_STRICT):

PHP Effective Memory Limit (memory_limit):
64M
Maximum Execution Time (max_execution_time):
60
PHP output_buffering (output_buffering):
1
PHP Safe Mode (safe_mode):
Off (False)
File uploads (file_uploads):
On (True)
Maximum Post Size (post_max_size):
64M
Maximum Upload Size (upload_max_filesize):
64M
Session Save Path (session_save_path):
/tmp (1777)
Sessions are allowed to use Cookies (session_use_cookies):
On (True)
Basic XML (expat) support (xml_function):
On (True)
Checking if the httpd process can create a file inside of a directory it created (create_dir_and_file):

PHP register_globals (register_globals):
Off (False)
disable_functions in PHP (disable_functions):

PHP Open Basedir (open_basedir):

Test for remote URL (test_remote_url):

fsockopen: Connection ok!  
fopen: Connection ok!
Test ini_set (check_ini_set):
On (True)
Server Information:
Server API (server_api):
cgi-fcgi
Server Database (server_db_type):
MySQL (mysql)
Server Database Version (server_db_version):
5.1.50
Server Software (server_software):
Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Server Operating System (server_os):
Linux 2.6.34.6 On i686

Permission Information
tmp:
/home/site/public_html/tmp (0755)
templates_c:
/home/site/public_html/tmp/templates_c (0755)
modules:
/home/site/public_html/modules (0755)
File Creation Mask (umask):
/home/site/public_html/tmp/cache (0755)
config_file:
0644
config.php writable. It is more safe if you change permission to read-only
Post Reply

Return to “CMSMS Core”