.htaccess, please help with combining code

Discussion in 'Apache' started by Rimbo, Jul 22, 2008.

  1. #1
    Hello all,

    Question from The Netherlands. Having trouble with my .htaccess file. Don't know anything about it, tutorials 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. Can't get it to work...

    Thanks for any help! Greetings
     
    Rimbo, Jul 22, 2008 IP