Redirect Issue When Deployed To Hostgator Share Hosting

Hi,

I tried to get the URL "http://abc.com/en/product/1" for my project. I used the following redirect script in .htaccess which is under my project folder "en".

Options +FollowSymLinks

IndexIgnore /

RewriteEngine on

RewriteBase /en/

if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

otherwise forward it to index.php

RewriteCond $1 !^(index\.php)

RewriteRule ^(.+)$ index.php?$1 [PT,L,QSA][/indent][/indent]

In my local apache server which is under WAMP, it worked well.

But when I deployed the application to Hostgator which is share hosting, my redirect is not working.

Please help me to solve.

Appreciate your advice in advance.

Regards,

Win Naung

Hi Win, you can actually do this via cPanel. Just search redirect on Hostgator KB site.

Hi,
Did you discuss with your hosting provider? If not then I would suggest you contact their support team they will guide you better. I haven’t used this hosting before so that’s why I haven’t idea. I prefer some other good hosting provider like SiteGround, Cloudways, and WPEngine, etc.