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

Go Back   LiteSpeed Support Forums > LiteSpeed Load Balancer > General > [solved] LSLB Rewrite doesn't work

Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2011, 11:31 PM
dihuta dihuta is offline
Member
 
Join Date: Oct 2010
Posts: 37
Default [solved] LSLB Rewrite doesn't work

Hello,

Today I try to use Rewrite feature of LSLB but it doesn't work.
Here what I try:

Virtual Host -> my virtual host -> Rewrite
- Enable Rewrite to Yes
- Rewrite rules to test

Quote:
RewriteEngine on
RewriteRule ^test.rss http://www.google.com/ [L,R=301]
The I try www.mydomain.com/test.rss
Nothing happen, page not found. This rule works fine if I put it in .htaccess of a node.

Please help me to use it.
Thank you.

Last edited by NiteWave; 12-18-2011 at 12:46 AM..
Reply With Quote
  #2  
Old 12-18-2011, 12:42 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
RewriteRule ^test.rss http://www.google.com/ [L,R=301]
-->
RewriteRule ^/test.rss http://www.google.com/ [L,R=301]

this is the difference between per-server and per-dir rewriterule.
for further reference:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
Reply With Quote
  #3  
Old 12-18-2011, 12:45 AM
dihuta dihuta is offline
Member
 
Join Date: Oct 2010
Posts: 37
Working fine now.
Thank you.
Reply With Quote
  #4  
Old 12-24-2011, 04:25 AM
dihuta dihuta is offline
Member
 
Join Date: Oct 2010
Posts: 37
Another issue was solved.
Thank you.

Last edited by dihuta; 12-24-2011 at 04:29 AM..
Reply With Quote
  #5  
Old 12-24-2011, 06:29 PM
dihuta dihuta is offline
Member
 
Join Date: Oct 2010
Posts: 37
Default Help me to move Rewrite rules of VBSEO to LSLB rewrite

Hello,

I moved all my rewrite rules to LSLB Rewrite, but I can not make VBSEO Rewrite rules to work.

Here it is:

PHP Code:
#########
RewriteBase /

### VBSEO
RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$[L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|db/|cron|vbseo_sitemap)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteCond 
%{REQUEST_FILENAME} !/(admincp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [QSA
Could you please help me make this work?
Thank you so much.
Reply With Quote
  #6  
Old 12-28-2011, 10:09 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
in LSLB rewrite (just like rewrite in httpd.conf),

RewriteRule ^(...)$

should be

RewriteRule ^/(...)$
Reply With Quote
  #7  
Old 12-28-2011, 02:53 PM
dihuta dihuta is offline
Member
 
Join Date: Oct 2010
Posts: 37
I try this, but it doesn't work. All pages was displayed in blank

Quote:
### VBSEO
RewriteRule ^/((urllist|sitemap_).*.(xml|txt)(.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|db/|cron|vbseo_sitemap)
RewriteRule ^/((archive/)?(.*.php(/.*)?))$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|clientscript|cpstyles|images)/
RewriteRule ^/(.+)$ vbseo.php [QSA]
Reply With Quote
  #8  
Old 12-28-2011, 08:55 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
enable rewrite logging (LogLevel -> 9) to troubleshoot.
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 08:13 AM.



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