How to Do Htaccess Redirect index.php to Root

SEO Tips:How to increase website traffic

 

To Redirect Index.php to Root and your sub domain also use below snippet . It will work for Redirect index.php to Sub domain or can redirect to domain with out index.php in url

Steps:

  1. First Download your htaccess file form server
  2. Login to your ftp or C Panel account to connect to your server
  3. Take a backup file first and now download your htaccess file from server
  4. Open that htaccess file in your editor edit plus or Dreamweaver.
  5. Now add below snippet in your htaccess file
  6. save and upload in to server

Snippet:
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]

It will work for index.php is redirect to domain.

Once upload this htaccess file in to your server check in browser it will redirect index.php to domain.

You must be logged in to post a comment Login

Leave a Reply