Jump to content

index.php 301 redirect to folder issue


igor berger

Recommended Posts

To prevent cononical duplication you need to rewrite index.php to the folder.

If anyone has tried doing it, they must have realized of the infinite loop it creates.

 

There is a solution! Check for server header request.

 

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ http://www.travelinasia.net/ [R=301,nc]

 

You can also doing the other way around folder to index.php

 

Canonical duplication is very bad for search engines, one must point all canonical domains to an authoritative domain.

 

Igor

Link to comment
https://forums.phpfreaks.com/topic/59871-indexphp-301-redirect-to-folder-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.