Step 1. Enable mod_rewrite on your Apache web server.
Step 2. Create .htaccess file in root directory.
Step 3. Remove index.php by htaccess
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/newdomain [NC]
RewriteRule ^ /newdomain%{REQUEST_URI} [R=301,L]
</IfModule>
Step 4. Restart Apache Server
sudo service apache2 restart
Copyright ©2022 coderraj.com. All Rights Reserved.