Hello everybody, I have canonical issue in my website. I want to redirect "ruraltraveller.com" and "www.ruraltraveller.com/index.php" to "www.ruraltraveller.com" so please suggest me how I will do this using .htaccess. If possible please give me code snippet for that as well. Thanks in advance.
scatteredpixels
0
Newbie Poster
Recommended Answers
Jump to PostThis should do it ... it's untested though.
# Force everyone to use www.example.com RewriteCond %{HTTP_HOST} !^www.example.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] RewriteRule ^index.php$ http://www.example.com [R=301,L]
All 3 Replies
puneet12121221
0
Newbie Poster
Dani
4,084
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
siyajoshi
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.