Pretty urls not working for me
Posted: Tue Oct 11, 2016 1:49 pm
I have a functioning site with cmsms and I'm trying to enable pretty urls. I'm following the instructions on this page https://docs.cmsmadesimple.org/configuration/pretty-url
but it's not working. I can get to the landing page, but each nav link takes me to a 404 page not found.
If I manually enter http://www.mysite.com/index.php?page=mypage the page is found.
I'm using cmsms 2.1.5 on ubuntu 14.04, apache 2.4.7 and mysql 5.5.52
This is the conf file in sites-enabled
This is my .htaccess file
rewrite module is enabled as well as the others cited in htaccess.
$config['url_rewriting'] = 'mod_rewrite'; is in my config.
I've cleared the site cache several times without success.
Is there anything additional that needs to be done? After enabling pretty urls, there are a few options that appear in the content editor. I've tried to play with these as well, without success.
but it's not working. I can get to the landing page, but each nav link takes me to a 404 page not found.
If I manually enter http://www.mysite.com/index.php?page=mypage the page is found.
I'm using cmsms 2.1.5 on ubuntu 14.04, apache 2.4.7 and mysql 5.5.52
This is the conf file in sites-enabled
Code: Select all
<VirtualHost www.mysite.com:80>
ServerName www.mysite.com
DocumentRoot /var/www/cmsms
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/cmsms/assets>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/cmsms/local_assets>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
Code: Select all
ServerSignature Off
<IfModule rewrite_module>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
<Files ~ "\.htaccess">
Order allow,deny
Deny from all
</Files>
<Files ~ "\.ini$">
Order allow,deny
Deny from all
</Files>
<Files ~ "\.log$">
Order allow,deny
Deny from all
</Files>
<Files ~ "config\.php">
Order allow,deny
Deny from all
</Files>
<Files ~ "/lib/*php">
Order allow,deny
Deny from all
</Files>
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 ^.*/plugins/.*\.php$
RedirectMatch 403 ^.*/modules/.*\.php$
RedirectMatch 403 ^.*/uploads/.*\.php$
<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>
<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>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
# Set expires tags on various file types... so that the browser wont 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['url_rewriting'] = 'mod_rewrite'; is in my config.
I've cleared the site cache several times without success.
Is there anything additional that needs to be done? After enabling pretty urls, there are a few options that appear in the content editor. I've tried to play with these as well, without success.