cgimickalo

Well-Known Member
Apr 19, 2013
78
0
6
N.W. Iowa
cPanel Access Level
Root Administrator
Hello

we have a customer who is attempting to setup and redirect through their cPanel. what they are trying to do is setup a rewrite rule so when this webpage is called up /signup/signup1.html they are redirected to the /signup/signup.html below is the rules setup in their htaccess file

Code:
RewriteOptions inherit
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
RewriteCond %{HTTPS} on

RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.com$
RewriteRule ^signup\/signup1\.html$ "http\:\/\/www\.domain\.com\/signup\/signup\.html" [R=301,L]
This was all setup within their cPanel control panel and it doesn't seem to be working or redirecting. Any help or suggestion would be appreciated.

Thanks,
Mike
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

I added a similar redirect on a test server, and the following Mod_Rewrite rules worked successfully:

Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^cptest123\.info$ [OR]
RewriteCond %{HTTP_HOST} ^www\.cptest123\.info$
RewriteRule ^signup\/123\.html$ "http\:\/\/cptest123\.info\/signup\/1234\.html" [R=301,L]
It looks like your first rewrite rule may be conflicting with the second one. Have you checked to see if the issue persists after temporarily disabling the first custom rule, or by moving that first rule below the second one?

Thank you.