.htaccess rule

Discussion in 'General' started by craigles, Mar 17, 2012.

  1. craigles

    craigles Active Member

    Hi Guys,

    Customer has a RewriteRule working under apache, but not Litespeed.

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^documents/VCOSS_docs/(.*) /documents/VCOSS%20docs/$1

    ErrorDocument 404 /errors/404.html

    Basically the client has a legacy folder in their home directory which has a space, so they need to rewrite it from a _ to %20 (space) char.

    I've tried changing it to RewriteRule ^documents/VCOSS_docs/(.*) /documents/VCOSS\%20docs/$1 but it hasn't made any difference.

    Can you suggest a way to do this?

  2. mistwang

    mistwang LiteSpeed Staff

    Please try "Force reinstall" of 4.1.11 from web console.

    RewriteRule ^documents/VCOSS_docs/(.*) /documents/VCOSS\%20docs/$1

    should work now, same as with Apache.
  3. craigles

    craigles Active Member


    Problem still exists apparently - the rewrite I mentioned above is mapping into the following when trying to access a document (and yes I also forced the re-install of 4.1.11).

    2012-03-19 11:32:34.909 [INFO] [] File not found [/home/vcossorg/public_html/vcoss.org.au/documents/VCOSS0docs/Submissions/2012/VCOSS_Submission_on_Bus_Specifications.doc]
    2012-03-19 11:32:35.796 [INFO] [] File not found [/home/vcossorg/public_html/vcoss.org.au/documents/VCOSS0docs/Submissions/2012/VCOSS_Submission_on_Bus_Specifications.doc]

    So the %2 is being parsed but not the 0 in %20 so it's still not working as desired.

  4. mistwang

    mistwang LiteSpeed Staff

    %20 wont work, You need to escape the percentage character "\%20".

Share This Page