View Full Version : [solved] LSLB Rewrite doesn't work
dihuta
12-17-2011, 11:31 PM
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
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
Hello,
I moved all my rewrite rules to LSLB Rewrite, but I can not make VBSEO Rewrite rules to work.
Here it is:
#########
RewriteBase /
### 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]
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
### 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.