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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2008, 06:58 AM
henster henster is offline
Member
 
Join Date: Jun 2006
Posts: 10
Default Rewrite maps

Hi there,

I have a txt file with a couple of thousand Apache style redirects in.. for example..

RewriteRule ^/myfile.htm http://www.domain.com/myfile [R=301,L]

Under apache I would just do

Include /path/to/my/redirect_file

"Include" doesn't seem to be allowed in LS. I have played around a little with the RewriteMaps but can't seem to get anything working.

How is this supposed to be done?

Thanks
Henry
Reply With Quote
  #2  
Old 04-29-2008, 10:39 AM
anewday anewday is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 723
Did you put quotes?

Code:
Include "/path/to/my/redirect_file"
Reply With Quote
  #3  
Old 04-29-2008, 11:31 AM
henster henster is offline
Member
 
Join Date: Jun 2006
Posts: 10
Thanks for the reply. Yeah, I tried that..

This is in the log..

"Directive 'Include' is not allowed in current context."

?
Reply With Quote
  #4  
Old 04-29-2008, 12:25 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Are you using Include in a .htaccess?
Reply With Quote
  #5  
Old 04-29-2008, 12:37 PM
henster henster is offline
Member
 
Join Date: Jun 2006
Posts: 10
I currently have the Include in the rewrite rules of a vhost. Is there somewhere else I could put it?
Reply With Quote
  #6  
Old 04-29-2008, 12:46 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
from Apache configuration file or native configuration in LSWS admin console?
Reply With Quote
  #7  
Old 04-29-2008, 12:59 PM
henster henster is offline
Member
 
Join Date: Jun 2006
Posts: 10
Sorry, that wasn't clear was it.

I have it in the native configuration in the LS admin console.

-henry
Reply With Quote
  #8  
Old 04-29-2008, 01:44 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Include directive won't work with native configurations, need to add those configuration from the web console.

Anyway, letting a web server go through thousands of rewrite rules for each request is not a good idea either. Do you really have to do that way?
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 02:22 AM.



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