Page 1 of 1
Pretty URLs
Posted: Thu Jan 25, 2007 1:48 pm
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
Re: Pretty URLs
Posted: Thu Jan 25, 2007 1:57 pm
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?
Re: Pretty URLs
Posted: Thu Jan 25, 2007 2:08 pm
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
Re: Pretty URLs
Posted: Thu Jan 25, 2007 3:05 pm
by cyberman
Re: Pretty URLs
Posted: Thu Jan 25, 2007 6:16 pm
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
Re: Pretty URLs
Posted: Thu Jan 25, 2007 6:36 pm
by tsw
triple check .htaccess filename and ask your isp if they support it
Re: Pretty URLs
Posted: Thu Jan 25, 2007 7:51 pm
by SilverXp
Hi,
They support it, I asked it another time.
Bye,
Thom
Re: Pretty URLs
Posted: Fri Jan 26, 2007 7:35 am
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
Re: Pretty URLs
Posted: Fri Jan 26, 2007 10:03 pm
by Pierre M.
Re: Pretty URLs
Posted: Sat Jan 27, 2007 12:37 pm
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!