Sir i want to redirect non www to www site but not working

Started on the old forum in December 2014 · view the original in the archive · old links redirect here

4 replies · 90 views · started 11 years ago · 1 min read

3 participants
something else Fellow · 2,296 posts #5

daizu wrote: i also need htaccess code which will redirect my site example.com to www.example.com when my site viewed..

RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close