Page 1 of 1

Help needed with .htaccess code

Posted: Mon Jul 21, 2008 4:25 pm
by Rimbo
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

Re: Help needed with .htaccess code

Posted: Mon Jul 21, 2008 8:14 pm
by WebbieDave
:offtopic: This forum is for help with PHP coding. You'll want to visit one of the many fine Apache forums out there :)

Re: Help needed with .htaccess code

Posted: Tue Jul 22, 2008 2:02 am
by Rimbo
ok, thanks, didn't even know it was called Apache ;)