Pretty URLs

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.
Locked
SilverXp

Pretty URLs

Post by SilverXp »

Hello,


I want to make pretty URLs. These are my settings in config.php:

$config['assume_mod_rewrite'] = false;
$config['page_extension'] = '.php';
$config['internal_pretty_urls'] = true;
$config['use_hierarchy'] = true;

I also created the .htaccess file in the start map.

I want to have these URLs: http://www.example.com/parent/child

But everytime I put $config['assume_mod_rewrite'] = false; on I don't get an error but I can't change pages and I can only view the Home page.

Now my URLs are: http://www.example.com/index.php/parent/child
But I want them like this: http://www.example.com/parent/child

Can somebody help?


Bye,
Thom
cyberman

Re: Pretty URLs

Post by cyberman »

Hi Thom
SilverXplosion wrote: $config['assume_mod_rewrite'] = false;
must be true to use url rewriting via .htaccess.
I also created the .htaccess file in the start map.
Which commands are inside this file?
SilverXp

Re: Pretty URLs

Post by SilverXp »

Hello,


I know that: $config['assume_mod_rewrite'] = false; must be true, but if I do that it gets all stuck.

This is inside my .htaccess file:

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# Make sure you have Options FollowSymLinks
# and Allow on
RewriteEngine On

#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

I hope that this can help you...


Bye,
Thom
cyberman

Re: Pretty URLs

Post by cyberman »

SilverXp

Re: Pretty URLs

Post by SilverXp »

Hello,


I read it and tries it.

I installed the new .htaccess file and changed config.php and the {metadata} plugin is already installed in the template (default).

But still the pages don't change and I keep seeing home.

Any other suggestions?


Bye,
Thom
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Pretty URLs

Post by tsw »

triple check .htaccess filename and ask your isp if they support it
SilverXp

Re: Pretty URLs

Post by SilverXp »

Hi,

They support it, I asked it another time.

Bye,
Thom
SilverXp

Re: Pretty URLs

Post by SilverXp »

I tried again now, but still it doesn't work.

All other URL options work, like the: http://www.example.com/index.php/parent/child/
But this option doesn't work: http://www.example.com/parent/child/

The last option is the one that I want.

I already read the User Handbook and I read the FAQ.

Is there anything more that I can do?


Bye,
Thom
Pierre M.

Re: Pretty URLs

Post by Pierre M. »

Hello, try the Apache alone :
http://forum.cmsmadesimple.org/index.ph ... l#msg43943
Hope this helps.
PM
SilverXp

Re: Pretty URLs

Post by SilverXp »

Thanks fot the tip, but I found the problem now.

I had to leave:

#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';

in default way.

Now I see why it didn't work.

Thanks to all!
Locked

Return to “CMSMS Core”