.htacces redirect issue
Posted: Wed Oct 29, 2008 7:54 pm
I have a little problem.
Iv'e set up my CMSMS to show "pretty urls"
first i created a .htaccess file and entered the following code:
Then i added these lines to the config.php file:
The urls were then made "pretty" so this works fine.
Then i added the following lines to the .htacces file to rediret all incoming traffic from domain.com to www.domain.com:
Below ive added the code so you can see it in context:
Afteriadding these 3 lines i could no longer log in, when i removed them again i could log in again, so these three lines must do something that causes me to be unable to log in.
Does anyone know how i can solve this problem?
Im not sure which version of php im using but im runnnign MySQL 5.
CMS Made Simple Version : cmsmadesimple-1.4.1-base
Any help will be greatly appreciated
Best Regards
Zircle
Iv'e set up my CMSMS to show "pretty urls"
first i created a .htaccess file and entered the following code:
Code: Select all
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Code: Select all
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '/';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
Then i added the following lines to the .htacces file to rediret all incoming traffic from domain.com to www.domain.com:
Code: Select all
[b]RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L][/b]
Code: Select all
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Does anyone know how i can solve this problem?
Im not sure which version of php im using but im runnnign MySQL 5.
CMS Made Simple Version : cmsmadesimple-1.4.1-base
Any help will be greatly appreciated

Best Regards
Zircle