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
Article: Installation > Clean Urls
-
- Translator
- Posts: 169
- Joined: Sat Mar 12, 2005 12:30 pm
- Location: Vienna
Re: Article: Installation > Clean Urls
But how htaccess the file is to read?
Much-calibrated so:
Please help!
Much-calibrated so:
Code: Select all
RewriteEngine on
RewriteRule ^seite_(.*).html$ index.php?page=$1
Re: Article: Installation > Clean Urls
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:
But on my subdomain i got an HTTP 404 error (it works fine now) and the .htaccess was exactly the same:
In both examples the config.php file have these values:
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:
...and now it works..!
Server info:
Apache/2.0.51 (Fedora)
PHP Version 4.3.10
Sincerely
Nano
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]
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]
Code: Select all
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
Code: Select all
RewriteBase /
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]
Server info:
Apache/2.0.51 (Fedora)
PHP Version 4.3.10
Sincerely
Nano
Last edited by Nanochild on Sun May 07, 2006 5:32 pm, edited 1 time in total.