Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
Redirecting multiple duplicate URLs to main URL using .htaccess

I developed a website and from SEO point of view, the homepage of a website is available under three or more different URLs which accordingly poses a risk of duplicate content, since the same content can be accessed via different URLs.

for eg. my website is opening with below URL

https://www.insider.in/index.php

https://www.insider.in/

https://insider.in/

Exact URL which is needed be like

https://www.insider.in/

for achieving the same i am using an .htaccess file with code given below:

RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*index\.(php|html?)[#?]?
RewriteRule ^(([^/]+/)*)index\.(php|html?)$ https://insider.in/$1[R=301,L]

I tried to redirect all duplicate URLs to one URL using the above .htaccess file code but it is not working, also i enabled all the file permissions in FileZilla but again no success.

Any help or reference will be appreciated, thankyou!

note- website is hosted in cloud server using FileZilla

for Reference I am sharing the screenshots

Image of development folder for your reference

Image of .htaccess rule which i have used

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use the rules below to fix duplicate content issues on your site :

 RewriteEngine on

#Redirect non-www domain to www
RewriteCond %{HTTP_HOST} ^insider\.in$ [NC]
RewriteRule ^ https://www.insider.in%{REQUEST_URI} [NE,L,R=301]
 #Redirect /index.php to /
RewriteCond %{REQUEST_URI} ^/index\.php$
RewriteRule ^ https://www.insider.in/ [L,R=301]

Remember to put theses rules at the top of your htaccess.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!