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

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > Weird .htaccess problem

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2007, 08:39 PM
haxan haxan is offline
New Member
 
Join Date: Aug 2007
Posts: 2
Post Weird .htaccess problem

For some reason:

RewriteRule ^tutorials([/]?)$ ./tutorials.php?page=1 [L]

The above line of code is working and the bottom link IS NOT

RewriteRule ^tutorials/([-_a-zA-Z0-9\.]+)([/]?)$ ./tutorials.php?cat=$1&page=1 [L]


I tried and changed the the above line to :

RewriteRule ^tutorial/([-_a-zA-Z0-9\.]+)([/]?)$ ./tutorials.php?cat=$1&page=1 [L]

Removing only the letter 's' from tutorials and it seems to be working again.

The problem now is that i need to use tutorials and not tutorial word.

I am having this kinda problem with several other lines too.

It used the work in Apache bytheway.


Further more, another weird problem:

I have a series of mod_rewrite lines written:

RewriteRule ^search([/]?)$ ./doSearch.php [L]
RewriteRule ^search/([-_a-zA-Z0-9\.]+)([/]?)$ ./doSearch.php?searchCat=$1 [L]
RewriteRule ^search/([-_a-zA-Z0-9\.]+)/([0-9]+)([/]?)$ ./doSearch.php?searchCat=$1&page=$2 [L]
RewriteRule ^search/([-_a-zA-Z0-9\.]+)/([-_a-zA-Z0-9\.]+)([/]?)$ ./doSearch.php?searchCat=$1&searchKeywords=$2 [L]
RewriteRule ^search/([-_a-zA-Z0-9\.]+)/([-_a-zA-Z0-9\.]+)/([0-9]+)([/]?)$ ./doSearch.php?searchCat=$1&searchKeywords=$2&page=$ 3 [L]


The above lines only work uptill search/this-is-a-test
but fails when this url is used /search/this-is-a-test/2

now i fixed the issue by replacing all the ^search/ with ^searc/ and this seems to work just fine.

is the word ^search/ kinda reserved or something.
Reply With Quote
  #2  
Old 08-22-2007, 08:56 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Can you turn on rewrite logging with "RewriteLogLevel 9" in the vhost configuration section in httpd.conf? Then you will get a rewrite logs in lsws/logs/error.log
Reply With Quote
  #3  
Old 08-23-2007, 05:40 PM
haxan haxan is offline
New Member
 
Join Date: Aug 2007
Posts: 2
hmmm,


yeah sure i can.


bytheway i think i found out the problem

the thing is that the htaccess file that i am using is some how merging with the one at the www domain. (i am on a subdomain)

so its written in the htaccess on the www domain ^tutorials/([a-zA-Z]+)$ ./searchCategory.php?cat=$1 [L]

and its written in the htaccess of the 'test' subdomain tutorials/([a-zA-Z]+)$ ./tutorials.php?cat=$1 [L]

so it tries to find the searchCategory.php file which does not exist in that subdomain . (its in the www domain)

got any clues how to stop letting the merge??
Reply With Quote
  #4  
Old 08-23-2007, 05:50 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
It was fixed in the latest 3.2.2 build. http://www.litespeedtech.com/package...6-linux.tar.gz
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 01:21 PM.



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