LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   General (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=29)
-   -   [solved] LSLB Rewrite doesn't work (http://www.litespeedtech.com/support/forum/showthread.php?t=5562)

dihuta 12-17-2011 11:31 PM

[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.

NiteWave 12-18-2011 12:42 AM

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

dihuta 12-18-2011 12:45 AM

Working fine now.
Thank you.

dihuta 12-24-2011 04:25 AM

Another issue was solved.
Thank you.

dihuta 12-24-2011 06:29 PM

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.

webizen 12-28-2011 10:09 AM

in LSLB rewrite (just like rewrite in httpd.conf),

RewriteRule ^(...)$

should be

RewriteRule ^/(...)$

dihuta 12-28-2011 02:53 PM

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]

webizen 12-28-2011 08:55 PM

enable rewrite logging (LogLevel -> 9) to troubleshoot.


All times are GMT -7. The time now is 01:21 AM.