PDA

View Full Version : Rewrite maps


henster
04-29-2008, 07:58 AM
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

anewday
04-29-2008, 11:39 AM
Did you put quotes?

Include "/path/to/my/redirect_file"

henster
04-29-2008, 12:31 PM
Thanks for the reply. Yeah, I tried that..

This is in the log..

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

?

mistwang
04-29-2008, 01:25 PM
Are you using Include in a .htaccess?

henster
04-29-2008, 01:37 PM
I currently have the Include in the rewrite rules of a vhost. Is there somewhere else I could put it?

mistwang
04-29-2008, 01:46 PM
from Apache configuration file or native configuration in LSWS admin console?

henster
04-29-2008, 01:59 PM
Sorry, that wasn't clear was it.

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

-henry

mistwang
04-29-2008, 02:44 PM
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?