[SOLVED] Pretty URL's - Not working

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
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

[SOLVED] Pretty URL's - Not working

Post by slicencode »

Hi,

I've done all the changes (except for the metadata tag, the information shown in the metadata field is already in my templates so not sure if it'll be of much use), but I don't think my .htaccess is even functioning, see here:

http://www.colunas.ch/index.php?page=unsere-dienste

Try any of the links, it's not even doing any of the functions (I have the config set to mod rewrite and put the htaccess file as per the documentation in the root folder). I didn't have this issue with another site I run on a different box.

Code: Select all

  Options +FollowSymLinks
  RewriteEngine on
  RewriteBase /
 
  # 301 Redirect all requests that don't contain a dot or trailing slash to
  # include a trailing slash
  # except for form POSTS
  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]
Any ideas? (using 1.6.1 "Canala")

Many thanks in advance!
Last edited by slicencode on Tue Oct 20, 2009 5:28 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Pretty URL's - Not working

Post by Jos »

I don't read you have made changes to the config.php file?

And as far as I know the {metadata} tag has to be in...
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: Pretty URL's - Not working

Post by slicencode »

Jos wrote: I don't read you have made changes to the config.php file?

And as far as I know the {metadata} tag has to be in...
I've mentioned above that I have edited the config file, to my knowledge the metadata tag only screwed up images from time to time, as such it should still be rewriting the initial link.

Thanks for your reply :)

Edit: For the sake of this discussion, I've now added {metadata} to the template :)
Last edited by slicencode on Tue Oct 20, 2009 4:04 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Pretty URL's - Not working

Post by Jos »

Sorry, I overlooked it...
But my guess is still there must be something wrong in config.php, because thats where you can tell the system you want to have pretty urls.
The htaccess is only to interpret the url correctly (transform it internally to its original 'ugly' form.

Did you clear the cache?
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: Pretty URL's - Not working

Post by slicencode »

Thanks again for your reply Jos, well appreciated.

I had cleared cache, and just did it again, no go.

Here is my config:

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'] = '/';

#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';
Funnily enough the links display correctly from the admin section when you hover over the magnifying glass.

In addition I used the "test" tool in CMSMS, output:

Code: Select all


Results

Owner: apache
Permissions:
  Owner: Read,Write
  Group: Read
  Other: Read
Last edited by slicencode on Tue Oct 20, 2009 4:22 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Pretty URL's - Not working

Post by Jos »

slicencode wrote: Funnily enough the links display correctly from the admin section when you hover over the magnifying glass.
Also points to the cache as the problem...
Did you go to Site Admin > Global Settings > tab Advanced setup?  or elsewhere
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: Pretty URL's - Not working

Post by slicencode »

Jos wrote:
slicencode wrote: Funnily enough the links display correctly from the admin section when you hover over the magnifying glass.
Also points to the cache as the problem...
Did you go to Site Admin > Global Settings > tab Advanced setup?  or elsewhere
Thanks Jos, that's exactly where I went (i.e. the "Clear Cache:" button)... could cache fail?

Edit: Went into the cache folder and all the files udpated to the current timestamp.
Last edited by slicencode on Tue Oct 20, 2009 4:40 pm, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Pretty URL's - Not working

Post by Jos »

slicencode wrote:could cache fail?
Never heard of it to fail... and config.php is also oke... :-\

Is your menu generated by the {menu} tag? or are they hard-coded.
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: Pretty URL's - Not working

Post by slicencode »

Hard-coded, in flexible form. i.e. not" www.abc.com/index.php", but "index.php". Would this pose a difference?
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: Pretty URL's - Not working

Post by Jos »

Well, hardcoded links won't be transformed to pretty, if you want to code yourself, you also have to code the pretty part of it  ;)
slicencode
Forum Members
Forum Members
Posts: 17
Joined: Sat Jul 25, 2009 7:27 am

Re: Pretty URL's - Not working

Post by slicencode »

Did I totally forget that or what, lol :D

Thanks for your help :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URL's - Not working

Post by Dr.CSS »

All this time and no one asked for a system info page paste?...

What does the system info say?...
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: [SOLVED] Pretty URL's - Not working

Post by Jos »

System info is nice, but not always relevant
Post Reply

Return to “CMSMS Core”