Help needed with .htaccess code
Posted: Mon Jul 21, 2008 4:25 pm
Hello all,
Question from The Netherlands. Having trouble with my .htaccess file. Don't know anything about it, tutaorials and other forumtopics can't help me, so maybe someone here can help me out!
The following: The .htacces below is working fine:
----------------------
php_flag display_errors on<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]
RewriteRule ^(.*)$ /url.php?url=$1 [L]
</IfModule>
----------------------
But now I want to combine it with another piece of code. So that http://domainblabla.nl will be linked automaticaly to http://www.domainblabla.nl.
That htaccess is as following:
----------------------
RewriteEngine On
rewritecond %{http_host} ^domainblabla.nl
rewriteRule ^(.*) http://www.domainblabla.nl/$1 [R=301,L]
----------------------
The question is: How do I put these two pieces together? Sounds easy, but for me it isn't.
Thanks for any help! Greetings
Question from The Netherlands. Having trouble with my .htaccess file. Don't know anything about it, tutaorials and other forumtopics can't help me, so maybe someone here can help me out!
The following: The .htacces below is working fine:
----------------------
php_flag display_errors on<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]
RewriteRule ^(.*)$ /url.php?url=$1 [L]
</IfModule>
----------------------
But now I want to combine it with another piece of code. So that http://domainblabla.nl will be linked automaticaly to http://www.domainblabla.nl.
That htaccess is as following:
----------------------
RewriteEngine On
rewritecond %{http_host} ^domainblabla.nl
rewriteRule ^(.*) http://www.domainblabla.nl/$1 [R=301,L]
----------------------
The question is: How do I put these two pieces together? Sounds easy, but for me it isn't.
Thanks for any help! Greetings