404 error when pretty urls are used (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
Dave59
Forum Members
Forum Members
Posts: 61
Joined: Sun Dec 27, 2009 5:18 pm

404 error when pretty urls are used (SOLVED)

Post by Dave59 »

Goodmorning
I am using 1.11.2.
My cofig:

Code: Select all

<?php
# CMS Made Simple Configuration File
# Documentation: /doc/CMSMS_config_reference.pdf
#
$config['dbms'] = 'mysqli';
$config['db_hostname'] = '*******.1and1.com';
$config['db_username'] = '*********';
$config['db_password'] = '**********';
$config['db_name'] = '************';
$config['db_prefix'] = 'pt_';
$config['timezone'] = 'Europe/Berlin';
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
?>
My .htaccess:

Code: Select all

Options +FollowSymLinks
RewriteEngine on
 
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L,NE]
 
# 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,NE]
I have entered the following “test1” as the url for the first page.
In the url bar I get http://www.entwurf.wats-on.de/pt/test1.html
The browser shows 404 not found.
If I comment out the inserted line in the config and remove the .htaccess all works fine with the standard url http://www.entwurf.wats-on.de/pt/index.php?page=test1 .
I can not see what I am doing wrong. As usual I expect it is obvious.
Would be greatfull for help.
No one else seems to have this problem??? or I least I have not found any mention of it.
Tried clearing all casches Still no joy
Thanks
Dave
Last edited by Dave59 on Mon Oct 15, 2012 8:20 am, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: 404 error when pretty urls are used

Post by Rolf »

Add to .htaccess

Code: Select all

#Sub-dir e.g: /cmsms
RewriteBase /pt
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Dave59
Forum Members
Forum Members
Posts: 61
Joined: Sun Dec 27, 2009 5:18 pm

Re: 404 error when pretty urls are used (Solved)

Post by Dave59 »

Thanks Rolf.
It works!
I forgot I had installed it in a test sub domain.
Very quick and a great help.
Dave
Post Reply

Return to “CMSMS Core”