LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > Cpanel redirect method not working

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2011, 01:29 PM
felosi felosi is offline
Senior Member
 
Join Date: Jun 2007
Posts: 249
Default Cpanel redirect method not working

not sure how long its been like this or if cpanel changed, not sure if it ever worked. I thought it did. But recently tried to add some redirects from cpanel and simply didnt work in ,.htaccess, tried adding same rules to httpd.conf didnt work. here are the rules that didnt work.

Running current version of lsws

Code:
RewriteCond %{HTTP_HOST} ^hostingsplus\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.hostingsplus\.com$
RewriteRule ^vps\-hosting$ "http\:\/\/hostingsplus\.com\/your\-choice\-of\-hosting\/vps\-hosting\/" [R=301,L]

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^shared\-hosting$ "http\:\/\/hostingsplus\.com\/your\-choice\-of\-hosting\/shared\-hosting\/" [R=301,L]

RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^ddos\-protected\-hosting$ "http\:\/\/hostingsplus\.com\/your\-choice\-of\-hosting\/ddos\-protected\-hosting\/" [R=301,L]
I had to change it to these rules manually to get it to work:

Code:
Redirect /shared-hosting http://hostingsplus.com/your-choice-of-hosting/shared-hosting/
Redirect /ddos-protected-hosting http://hostingsplus.com/your-choice-of-hosting/ddos-protected-hosting/
Redirect /vps-hosting http://hostingsplus.com/your-choice-of-hosting/vps-hosting/
Redirect /reseller-hosting-plans http://hostingsplus.com/your-choice-of-hosting/reseller-hosting-plans/

I have had to do this for a few clients so far.
Reply With Quote
  #2  
Old 06-23-2011, 03:32 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,338
Based on the redirects, try the following rewrite rules in .htaccess
Code:
#RewriteCond %{HTTP_HOST} ^hostingsplus\.com$ [OR]
#RewriteCond %{HTTP_HOST} ^www\.hostingsplus\.com$
RewriteRule ^vps-hosting$ "http://hostingsplus.com/your-choice-of-hosting/vps-hosting/" [R=301,L]

#RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^shared-hosting$ "http://hostingsplus.com/your-choice-of-hosting/shared-hosting/" [R=301,L]

#RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^ddos-protected-hosting$ "http://hostingsplus.com/your-choice-of-hosting/ddos-protected-hosting/" [R=301,L]

#RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^reseller-hosting-plans$ "http://hostingsplus.com/your-choice-of-hosting/reseller-hosting-plans/" [R=301,L]
Also add following lines to the hostingplus.com vhost section in httpd.conf to enable rewritelog for debugging (error_log).

Quote:
RewriteLogLevel 9
Reply With Quote
  #3  
Old 06-24-2011, 01:30 AM
felosi felosi is offline
Senior Member
 
Join Date: Jun 2007
Posts: 249
I know what has to be done to MANUALLY edit the .htaccess. But what I reported is simple - When you add a site redirect inside CPANEL the rewrite rules it puts in the .htaccess do not work with litespeed which means litespeed is not fully compatible with cpanel.

I or other hosts cannot simply wait until a client trys to add a redirect, see it not work, put in ticket and manually edit their .htaccess.

take it how you will, I dont need to know what to put where. It does not work default with cpanel on a fresh server so therefore I think is a legit bug request.

Also I have already tried what you suggested, commenting out the rewritecond, same thing.
Reply With Quote
  #4  
Old 06-24-2011, 09:43 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,338
Should have mentioned that the rules you posted in the first place (NOT manually edit) are also fine in our lab testing with the latest LSWS. It must be something else.

Did you enable Rewrite Logging and see why those rules are not working for you?

BTW, what's the LSWS version in question?

Last edited by webizen; 06-24-2011 at 09:49 AM..
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:41 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.