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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > .htaccess rule

Reply
 
Thread Tools Display Modes
  #1  
Old 03-17-2012, 09:13 AM
craigles craigles is offline
Member
 
Join Date: Jun 2011
Posts: 34
Default .htaccess rule

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?

Cheers,
Craig
Reply With Quote
  #2  
Old 03-17-2012, 10:42 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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.
Reply With Quote
  #3  
Old 03-18-2012, 05:35 PM
craigles craigles is offline
Member
 
Join Date: Jun 2011
Posts: 34
Hi,

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] [150.101.211.191:53213-6#APVH_vcoss.vcoss-old.org.au] 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] [150.101.211.191:53214-7#APVH_vcoss.vcoss-old.org.au] 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.

Cheers,
Craig
Reply With Quote
  #4  
Old 03-18-2012, 07:35 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
%20 wont work, You need to escape the percentage character "\%20".
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 11:32 PM.



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