.htaccess file does't work for the new cPanel hosting.

dragonbro

Member
Apr 1, 2014
5
0
1
cPanel Access Level
Website Owner
I just moved my website from a old classic Godaddy Linux hosting to a new cPanel one. There's a problem: The .htacess file does't work for the cPanel hosting (it works well for the classic hosting).

I use the .htaccess file to redirect people with Chinese browsers to another URL (google.com). the codes are as follow:

Code:
#BEGIN Block Chinese Browser
Options +FollowSymLinks
RewriteEngine on 
RewriteCond %{HTTP:Accept-Language} ^zh-cn.*$ [NC,OR]
RewriteCond %{HTTP:Accept-Language} ^zh.*$ [NC]
RewriteRule ^.*$ http://www.google.com [R=302,L]
#END Block Chinese Browser
How can I make it work for the cPanel hosting?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello :)

Do you notice any error messages in the "Error Log" option within cPanel? Have you contacted your hosting provider to get their input on the matter?

Thank you.
 

dragonbro

Member
Apr 1, 2014
5
0
1
cPanel Access Level
Website Owner
I guess this is something related to security, try commenting out this line:
Code:
#Options +FollowSymLinks
if it worked then its related to the security of Apache.
I deleted this line, but it still doesn't work.

- - - Updated - - -

Hello :)

Do you notice any error messages in the "Error Log" option within cPanel? Have you contacted your hosting provider to get their input on the matter?

Thank you.
The hosting provider (Godaddy) said they are not going to support such things. Below are what they said:

Support Staff Response
Dear Sir or Madam,
Thank you for contacting online support.

We do not do custom scripting, I would recommend checking on w3schools.org to see if your coding is correct.

If you have any further questions regarding this issue please let us know.
Sincerely,
Joe G.
Professional Hosting Services
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
You may want to consult with someone that specializes in Mod_Rewrite rules to determine what changes you can make to achieve the redirect.

Thank you.
 

FEERspreads

Registered
Apr 15, 2014
1
0
1
cPanel Access Level
Root Administrator
I just moved my website from a old classic Godaddy Linux hosting to a new cPanel one. There's a problem: The .htacess file does't work for the cPanel hosting (it works well for the classic hosting).
Can you explain how it doesn't work? I'm having a similar problem that I think I've pinpointed to the mess of overly thought-out httpd.conf files (although I'm still trying to get help with my issue). My .htaccess redirect code causes my pages to have no output, just a white window. Is this the same for you?
 

dragonbro

Member
Apr 1, 2014
5
0
1
cPanel Access Level
Website Owner
Can you explain how it doesn't work? I'm having a similar problem that I think I've pinpointed to the mess of overly thought-out httpd.conf files (although I'm still trying to get help with my issue). My .htaccess redirect code causes my pages to have no output, just a white window. Is this the same for you?
My case is the the webpage is not redirected at all (still the original webpage), as if the .htaccess does not exist.