Rewrite maps

Discussion in 'Install/Configuration' started by henster, Apr 29, 2008.

  1. henster

    henster New Member

    Hi there,

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

    RewriteRule ^/myfile.htm [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?

  2. anewday

    anewday Moderator

    Did you put quotes?

    Include "/path/to/my/redirect_file"
  3. henster

    henster New Member

    Thanks for the reply. Yeah, I tried that..

    This is in the log..

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

  4. mistwang

    mistwang LiteSpeed Staff

    Are you using Include in a .htaccess?
  5. henster

    henster New Member

    I currently have the Include in the rewrite rules of a vhost. Is there somewhere else I could put it?
  6. mistwang

    mistwang LiteSpeed Staff

    from Apache configuration file or native configuration in LSWS admin console?
  7. henster

    henster New Member

    Sorry, that wasn't clear was it.

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

  8. mistwang

    mistwang LiteSpeed Staff

    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?

Share This Page