I can't get my PrettyURL to work Topic is solved

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
mnoordermeer
New Member
New Member
Posts: 1
Joined: Tue Apr 10, 2018 7:46 pm

I can't get my PrettyURL to work

Post by mnoordermeer »

I've followed the steps described to activate pretyurl but it doesn't work

.htacces file :

Code: Select all

# This file is specific to Apache configurations.
# It attempts to optimize traffic and configuration for your CMS Made Simple™ website.
# Many options are disabled by default as some providers do not allow you to override some of these settings in the .htaccess file.

#
# Attempt to override some PHP settings.
# These settings may be helpful on some hosts if your default configuration does not meet CMSMS'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_value session.cookie_httponly true
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

#
# Disallow directory indexes. This can be an important security enhancement.
#
#Options -Indexes

#
# Don't allow the browser to know the type of signature.
#
ServerSignature Off

#
# Allow the Apache server to follow symbolic links. This is usually not necessary.
#
#Options +FollowSymLinks

#
# The following is to enable pretty URLs, only applicable if url_rewriting is set to 'mod_rewrite' in the config.php
#
<IfModule rewrite_module>
	RewriteEngine on
	# If your CMSMS installation is in a subdirectory of your domain, you need to specify the relative path (from the root of the domain) here.
	# In example: RewriteBase /[subdirectory name]
	RewriteBase /
	
	# Rewrites URLs in the form of /parent/child/grandchild 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 following are highly recommended security settings for files in your CMSMS install that should not be browsed directly.
#
RedirectMatch 403 ^/.*\.htaccess$
RedirectMatch 403 ^/.*\.log$
RedirectMatch 403 ^/.*\.ini$
RedirectMatch 403 ^/.*config\.php$
RedirectMatch 403 ^.*/doc/.*$
RedirectMatch 403 ^.*/lib/.*\.php$
RedirectMatch 403 ^.*/tmp/.*\.php$
RedirectMatch 403 ^.*/modules/.*\.php$
RedirectMatch 403 ^.*/uploads/.*\.php$
RedirectMatch 403 ^.*/assets/.*\.php$
RedirectMatch 403 ^.*/assets/.*\.tpl$

#
# The following are performance optimizations and security enhancements for content that is served by your CMSMS installation.
#
<IfModule mod_headers.c>
    # Disable Last-Modified for performance
    Header unset Last-Modified
	# Disable ETags
	Header unset ETag
	FileEtag None
	# For Security
	Header set X-Frame-Options "SAMEORIGIN"
</IfModule>

#
# The following setups compression for content, if compression is enabled on the server.
#
<IfModule deflate_module>
	AddOutputFilterByType DEFLATE text/html text/css text/plain text/html text/xml image/gif image/jpeg image/png image/ico text/javascript application/x-javascript application/javascript application/json application/pdf
</IfModule>

#
# The following allows the browser to cache images, scripts, stylesheets and videos. If the expires module is enabled on the server.
# Note, this applies to admin directory stuff too.
# however, for php files in the admin directory we explicitly st the header to not expire
#
<IfModule mod_expires.c>
	# ExpiresActive On
	# ExpiresDefault "access plus 1 month"
	# Set expires tags on various file types... so that the browser won't attempt to reload them.
	# ExpiresByType image/jpg "access plus 1 year"
	# ExpiresByType image/gif "access plus 1 year"
	# ExpiresByType image/ico "access plus 1 year"
	# ExpiresByType image/png "access plus 1 year"
	# ExpiresByType video/x-flv "access plus 1 year"
	# ExpiresByType application/pdf "access plus 1 year"
	# ExpiresByType application/x-shockwave-flash "access plus 1 year"
	# ExpiresByType application/javascript "access plus 1 month"
	# ExpiresByType application/x-javascript "access plus 1 month"
	# ExpiresByType text/javascript "access plus 1 month"
	# ExpiresByType text/css "access plus 1 month"
	<IfModule mod_headers.c>
		# Setting cache control to public allows proxy servers to cache the items too.
		# Header set Cache-Control "public"
	</IfModule>
</IfModule>
config.php

Code: Select all

<?php

# CMS Made Simple Configuration File

# Documentation: https://docs.cmsmadesimple.org/configuration/config-file/config-reference

#

$config['dbms'] = 'mysqli';

$config['db_hostname'] = 'xxxxxxxxxxxxxxxxxxx';

$config['db_username'] = 'xxxxxxxxxxxxxxxxxxx';

$config['db_password'] = 'xxxxxxxxxxxxxxxxxxx';

$config['db_name'] = 'xxxxxxxxxxxxxxxxxxx';

$config['db_prefix'] = 'cms_';

$config['timezone'] = 'Europe/Amsterdam';

$config['url_rewriting'] = 'mod_rewrite';
?>
Is there someone who can help me?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: I can't get my PrettyURL to work

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: I can't get my PrettyURL to work

Post by DIGI3 »

Perhaps you could also provide us with a link to the site so we can see what part isn't working.. like is it going to 404 pages, or just sticking with the unpretty urls, or..?
Not getting the answer you need? CMSMS support options
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm
Location: Marlow, UK

Re: I can't get my PrettyURL to work

Post by scooper »

and sorry for daft suggestion but in your post you called it a :

.htacces file
and not a
.htaccess file

- is the filename right?
Post Reply

Return to “CMSMS Core”