Redirect website to /index.php with .htaccess

You have a website with the name domain.com – and you want to redirect all incomming urls that are going to domain.com/ to domain.com/index.php

Solution

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^$
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule ^$ http://domain.com/index.php [L,R=301]

3 Comments

  1. oro

Leave a Reply