redirect 301 expert?

CG Sponsors




antudegil

Active Member
Joined
Feb 25, 2006
Messages
1,790
Reaction score
103
Points
33
sesape dekat sini tau tak pasal redirect 301 through .htaccess ?

aku ade problem since nak buat redirect. aku access aku punya .htaccess and adding below punya code tuk redirect aku punya site from example.com to www.example.com.

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
then aku buat header check utk nak tau samada dia ok ke tak and walla dia jadi but the problem is bila aku type example.com, trus kuar page load error (state direct loop). suppose dia akan kuar www.example.com.

sesape sini tau kenape jadi mcm ni n ada x solution?
 
Top
Log in Register