[Solved] Nice URLs not working with 1.11.7 ?

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
palun
Forum Members
Forum Members
Posts: 43
Joined: Sun Aug 02, 2009 9:08 am

[Solved] Nice URLs not working with 1.11.7 ?

Post by palun »

I have a problem getting nice URLs to work with CMSMS 1.11.7.

What's so weird is that I have done this many times before, with older versions, and I am using the same lines of code this time:

In htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>

In config.php file:

$config['url_rewriting'] = 'mod_rewrite';
$config['assume_mod_rewrite'] = true;

But it just doesn't work (pages cannot be found). What am I missing? (Something obvious, I'm sure.) Any ideas, anyone?

/ulf
Last edited by palun on Mon Jan 13, 2014 9:35 am, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Nice URLs not working with 1.11.7 ?

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
palun
Forum Members
Forum Members
Posts: 43
Joined: Sun Aug 02, 2009 9:08 am

Re: Nice URLs not working with 1.11.7 ?

Post by palun »

I have read it. But I still cannot see what I'm missing.

/ulf
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Nice URLs not working with 1.11.7 ?

Post by Dr.CSS »

It's hard for us to tell you what to do if we don't know what you have done already, step by step is best...

The htaccess stuff you pasted here is not what is in the htaccess.TXT or at least not all of it, the config rewrite below is the only one you need, the one below it is for page extension and you should have some kind whether it's .html or .php or .asp or whatever...

$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
maconl
New Member
New Member
Posts: 7
Joined: Sun Nov 17, 2013 9:59 am

Re: Nice URLs not working with 1.11.7 ?

Post by maconl »

hi ,
here the same
i have cmsms 1.11.9
have installed te seo tools2
after this i have done step by step as told at
http://docs.cmsmadesimple.org/configuration/pretty-url
but now i get a 404 Not Found error
the only page that works is the index

the news module pages give also the 404 ,,
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Nice URLs not working with 1.11.7 ?

Post by Rolf »

maconl wrote:the news module pages give also the 404
http://docs.cmsmadesimple.org/troublesh ... -error-404
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Nice URLs not working with 1.11.7 ?

Post by velden »

I think you should start to ask/verify with you hosting provider that mod_rewrite is allowed to be used.
maconl
New Member
New Member
Posts: 7
Joined: Sun Nov 17, 2013 9:59 am

Re: Nice URLs not working with 1.11.7 ?

Post by maconl »

hi ,
have also a webshop with friendly urls running on this server
so this is not the problem for me :)
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Nice URLs not working with 1.11.7 ?

Post by velden »

Can you post a link to the website?

You did not change the 'page' parameter during setup of cmsms? (it would be in the config.php file).
User avatar
Trenia
Forum Members
Forum Members
Posts: 81
Joined: Thu Dec 11, 2008 12:48 pm
Location: Norway

Re: Nice URLs not working with 1.11.7 ?

Post by Trenia »

Here is what I did. It works. I run the 1.11.9 version.

1. Add the two lines in your config.php

$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';

2. Paste this from the htaccess.txt (root/docs) in your .htaccess file:

RewriteEngine On
#Sub-dir e.g: /cmsms
RewriteBase /
# 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]

Also, in the head section of your HTML template, make sure that you have the {metadata} inserted.
maconl
New Member
New Member
Posts: 7
Joined: Sun Nov 17, 2013 9:59 am

Re: Nice URLs not working with 1.11.7 ?

Post by maconl »

Hi trenia,

tnx to point me in a direction ,,,
i had the lines already in my htaccess en config.php
also the {metadata} was already in the template

but when i say your message you pointed me in a direction :-)
the only thing i still have is the category from the news is not a pretty url but the articles are ,,

so perhaps the other solution what Rolf posted will help in this
will try this later today ,,

Velden , no everything in config.php is ok :-)

the problem was the htaccess file ,,
eh < :o > from the webshop on the same server ::)
when i changed this htaccess it works like a charm except the category
thanks for the great help on this
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Nice URLs not working with 1.11.7 ?

Post by Dr.CSS »

User avatar
Trenia
Forum Members
Forum Members
Posts: 81
Joined: Thu Dec 11, 2008 12:48 pm
Location: Norway

Re: Nice URLs not working with 1.11.7 ?

Post by Trenia »

I believe so. Works for me. No more questions here in a while. What do you think Palun?
palun
Forum Members
Forum Members
Posts: 43
Joined: Sun Aug 02, 2009 9:08 am

Re: Nice URLs not working with 1.11.7 ?

Post by palun »

Trenia wrote:I believe so. Works for me. No more questions here in a while. What do you think Palun?
I have now marked the thread as 'solved'. I never actually got around to trying any of the suggested solutions (customer lost interest in his business, and his web). I left the thread unsolved out of curiosity (anyone else experiencing the same mysterious problem?). But nice URLs are working fine on my other webs so...

Thanks all!
/ulf
Post Reply

Return to “CMSMS Core”