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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Rewrite Size limitation

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2005, 07:56 AM
gcisnet gcisnet is offline
New Member
 
Join Date: Aug 2005
Location: Vancleave, MS
Posts: 9
Default Rewrite Size limitation

I saw the thread about the 32k rewrite size limitation..can that be user specified or made larger? we have lots of rules...to import from our current apache configuration.
Reply With Quote
  #2  
Old 08-10-2005, 08:35 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
We will increase the limit to 512KB in future release, is that large enough?

That is the size limit of signle XML entry, it is fine as long as the total size of one group of rewrite rules is not over the limit. Rewrite rules in .htaccess does not have this limit.

Apache's rewrite engine is not very efficient, so I expect big performance boost for web sites using a lot of rewrite rules when switching to lsws, hope you can share the result with us. thanks.

George Wang
Reply With Quote
  #3  
Old 08-10-2005, 08:50 AM
gcisnet gcisnet is offline
New Member
 
Join Date: Aug 2005
Location: Vancleave, MS
Posts: 9
Well currently our .htaccess file is just around 64 k so that should be fine..I would hope... we have 3 clusters of apache servers with mysql db backends, looking at ways to improve performance.
I will run some tests using the rewrite rules during our bencmarks and will share that section with you. Thanks for a fine product.
Reply With Quote
  #4  
Old 08-10-2005, 09:44 AM
gcisnet gcisnet is offline
New Member
 
Join Date: Aug 2005
Location: Vancleave, MS
Posts: 9
Also I believe I can really reduce the rules by using RewriteMap However I believe..that has to be defined in the httpd.conf file, I tried adding a definition for a the map file, but the rewrite rule doesnt seem to be using the map file via references in the .htaccess file. Basically I want to convert certain urls the contain the name of a state to its abbreviation..
Instead they have a seperate rule for EACH state... and this is done for several URLS.. I am not the web page designer/programmer I am a system admin. Do you know of any issues with rewritemap? Can it be used with .htaccess defined rewrite rules?
Thanks
Reply With Quote
  #5  
Old 08-10-2005, 10:16 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Yes, you can use RewriteMap together with rewrite rules defined in a .htacess file, at least with LSWS. The RewriteMap must be defined at vhost level under the "Rewrite" tab for that vhost using the web admin interface, then that rewrite map can be referenced by any rewrite rule.
Reply With Quote
  #6  
Old 08-10-2005, 11:22 AM
gcisnet gcisnet is offline
New Member
 
Join Date: Aug 2005
Location: Vancleave, MS
Posts: 9
Well I am having problems. I set th map file in the vhost section, with the path etc htstatemap

alaska AK
alabama AL
arkansas AR

in the .htaccess file as a test I have
RewriteEngine on
RewriteBase /morbidobesity/
RewriteRule ^statetest\+(.*).html$ list-hospitals.phtml?State=abbr:$1 [QSA]

and I access the URL /statetest+alaska.html I get:
2005-08-10 13:19:53.900 [INFO] [65.5.164.39:3501-0#server3.gcisnet.net] [REWRITE] Source URI: 'statetest+alaska.html' => Result URI: 'list-hospitals.phtml?State=abbr:alaska'

Mod rewrite IS working with other tests I do, its the map lookup I cant make work.
I wound mention that its ..ah very bad to put $abbr:$1 I seemed to get some form of loop and had to kill the server.
Any ideas...? Should I move this to a different forum?

LLoyd
Reply With Quote
  #7  
Old 08-10-2005, 11:35 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
have you tried

Code:
RewriteRule ^statetest\+(.*).html$ list-hospitals.phtml?State=${abbr:$1} [QSA]
Reply With Quote
  #8  
Old 08-10-2005, 12:13 PM
gcisnet gcisnet is offline
New Member
 
Join Date: Aug 2005
Location: Vancleave, MS
Posts: 9
sheesh...I swear I did...but its working, thanks...still having some issues with size of the file, but I think I can get it down using the map enough to demo to the rest of the staff. Thanks for your help.
Reply With Quote
  #9  
Old 08-10-2005, 12:23 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
You are welcome.

You'd better add a default value for the map, there is bug will crash the server when no match found. it will be fixed in next release.

Code:
RewriteRule ^statetest\+(.*).html$ list-hospitals.phtml?State=${abbr:$1|unknown} [QSA]
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to redirect legacy URLs with Rewrite Map? subBlue Install/Configuration 1 01-18-2007 09:51 AM
rewrite rule not working shikha Install/Configuration 3 05-21-2006 06:11 PM
Rewrite before reverse proxy? jburks725 Install/Configuration 1 01-18-2006 12:17 PM
Rewrite not doing anything at all? pcguru Install/Configuration 1 12-07-2005 03:04 PM
rewrite content limit Channel_Cat Bug Reports 1 09-21-2004 03:37 PM


All times are GMT -7. The time now is 06:35 AM.



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