Rewrite URL

#1
Hi,

is it possible to use the mod_rewrite module included in LiteSpeed to achieve the following:

  • "domain.com/anything" displays "domain.com/script.php?argument=anything" without redirecting ("anything" can be anything, including the name of 2 directories in the root directory)
  • "domain.com" displays "domain.com/index.html" without redirecting
  • "domain.com/somedirectory/" displays "domain.com/somedirectory/index.html"
  • "domain.com/seconddirectory/image.jpg" works as expected

There is an option in Apache 2.4's mod_rewrite: RewriteOptions AllowNoSlash which helps doing that, but I got the information that this is not available in LiteSpeed.

Thanks!
 

mistwang

LiteSpeed Staff
#2
It can be done at vhost level, cannot do it .htaccess, because
"anything" can be anything, including the name of 2 directories in the root directory
If you need to let rewrite to handle URL pointing to existing directory, you need to do it at vhost level.
"AllowNoSlash" option does not matter.
 
Top