Page 1 of 1
Article: Installation > Clean Urls
Posted: Fri Sep 30, 2005 6:50 am
by kishman155
If you want to to use clean URL's like something.shtml and not index.php?page=something then
go on reading
Step 1
Copy file htaccess.txt from Your /doc directory to Your webroot and rename it to '.htaccess'
Step 2
Make sure there is line "$config['assume_mod_rewrite'] = true;" in Your /config.php file
Thats it now you have cleen Url's in your address
Was it not simple
Re: Article: Installation > Clean Urls
Posted: Thu Mar 09, 2006 10:20 am
by F4n4TiC
But how htaccess the file is to read?
Much-calibrated so:
Code: Select all
RewriteEngine on
RewriteRule ^seite_(.*).html$ index.php?page=$1
Please help!
Re: Article: Installation > Clean Urls
Posted: Tue Apr 18, 2006 6:41 pm
by Nanochild
No, it WAS NOT SIMPLE he he...
I have no problem with clean URLs as you can see
here and the .htaccess to this looks like this:
Code: Select all
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]
RewriteRule ^(.+)\.html$ index.php?page=$1 [QSA]
But on my
subdomain i got an HTTP 404 error (it works fine now) and the .htaccess was exactly the same:
Code: Select all
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]
RewriteRule ^(.+)\.html$ index.php?page=$1 [QSA]
In both examples the config.php file have these values:
Code: Select all
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
So after my hair had grown long into the machinery (me and my computer are now one unit) i wrote that i could try to use this:
So, for my
subdomain on exactly the same server, i take the .htaccess file and put this
RewriteBase / in just before the
RewriteCond %{REQUEST_FILENAME} !-f [NC] so it looks like this:
Code: Select all
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
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.+)\.html$ index.php?page=$1 [QSA]
...and now it works..!
Server info:
Apache/2.0.51 (Fedora)
PHP Version 4.3.10
Sincerely
Nano