Help needed with .htaccess code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rimbo
Forum Newbie
Posts: 2
Joined: Mon Jul 21, 2008 4:16 pm

Help needed with .htaccess code

Post 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
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Help needed with .htaccess code

Post 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 :)
Rimbo
Forum Newbie
Posts: 2
Joined: Mon Jul 21, 2008 4:16 pm

Re: Help needed with .htaccess code

Post by Rimbo »

ok, thanks, didn't even know it was called Apache ;)
Post Reply