Link to home
Start Free TrialLog in
Avatar of yarekGmail
yarekGmail

asked on

.htaccess simple redirection

Hi experts,

Here is a simple .htaccess question

presidentevil

My goal is to redirect presidentevil.fr to www.presidentevil.fr

I use that:

SetEnv PHP_VER 5
RewriteEngine on
Rewritecond %{HTTP_HOST} ^presidentevil.fr$
Rewriterule ^(.*) http://www.presidentevil.fr/$1 [QSA,L,R=301]

It seems the htaccess is active because If I remove
SetEnv PHP_VER 5
I got php errors.

Troubles is : when I type in presidentevil.fr it does not redirect to www. !
What am I doing wrong ?


regards

Avatar of quizwedge
quizwedge
Flag of United States of America image

I'm no expert at .htaccess, but check out the generator at http://www.htaccessredirect.net/index.php Looks like the syntax is a little off.

For a non-generator based solution, check out http://kb.mediatemple.net/questions/85/Using+.htaccess+rewrite+rules#gs/add-www-or-https
ASKER CERTIFIED SOLUTION
Avatar of boon86
boon86
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial