pretty url with more query vars

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
elcomportal
New Member
New Member
Posts: 7
Joined: Fri Jan 07, 2011 6:58 pm

pretty url with more query vars

Post by elcomportal »

Hi,
i want to use mod_rewrite with more than one query var.

That's my .htaccess:

Code: Select all

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
And that's in my config.php:

Code: Select all

$config['url_rewriting'] = 'mod_rewrite';
#Endung der virtuellen Dateien
$config['page_extension'] = '.htm';
#Wenn die Seiten in einer Baumstruktur aufgebaut werden sullen  (z.B. http://www.domainname.ch/parent/parent/childpage)
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
The URL without rewrite should be:
http://www.mydomain.com/index.php?page=PC&pg=2
but also it should be:
http://www.mydomain.com/index.php?page=xbox
Not ever i have the query var pg
How i have to configure the system to have a pretty url every time?
regards
Torsten
Locked

Return to “[locked] Installation, Setup and Upgrade”