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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > rewrire rules doesnt work

Reply
 
Thread Tools Display Modes
  #1  
Old 11-02-2012, 05:57 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
Default rewrire rules doesnt work

here is a part of rewrite rules we have



.htaccess
Options +SymLinksIfOwnerMatch
Options +Indexes
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^.]+)$ $1.php [NC,L]
...
RewriteRule ^gennemse!(.*) gennemse.php?page=$1 [QSA,L]
....
RewriteRule ^kalender~(.*)~(.*)~(.*) kalender.php?ini=$1&yr=$2&wk=$3 [QSA,L]


gennemse works well, however kalender say

Error 404: File Not Found

Here is debug log



2012-11-02 13:45:16.398 [NOTICE] [127.0.0.192:49650-1#APVH_mh.some.dk] Content len: 0, Request line: 'GET /kalender~Test~2012~44 HTTP/1.1'
2012-11-02 13:45:16.398 [INFO] [127.0.0.192:49650-1#APVH_mh.some.dk] Cookie len: 93, PHPSESSID=b85580ee1da14c4d1860ffeabcf69d13; 89a045bc98c0eb25473419f8719433d8150d1481=
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] Find context with URI: [/], location: [/hsphere/local/home/some/mh.some.dk/]
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] Find .htaccess context with URI: [/], location: [/hsphere/local/home/some/mh.some.dk/]
2012-11-02 13:45:16.398 [INFO] [127.0.0.192:49650-1#APVH_mh.some.dk] File not found [/hsphere/local/home/some/mh.some.dk/kalender~Test~2012~44.php]
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] processContextPath() return 25
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] processNewReq() return 25.
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] HttpConnection::sendHttpError(),code=404 Not Found
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] redirect to: URI=[/default/404.html], QueryString=[]
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] Error Page, processContextPath() return 0
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] processContextPath() return 0
2012-11-02 13:45:16.398 [DEBUG] [127.0.0.192:49650-1#APVH_mh.some.dk] readyCacheData() return 0
Reply With Quote
  #2  
Old 11-02-2012, 06:21 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
how about move
RewriteRule ^kalender~(.*)~(.*)~(.*) kalender.php?ini=$1&yr=$2&wk=$3 [QSA,L]

ahead, just after
RewriteEngine On
?
Reply With Quote
  #3  
Old 11-02-2012, 08:01 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 64
the same: kalender~Test~2012~44.php File not found ...
Reply With Quote
  #4  
Old 11-02-2012, 08:29 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
~ may have special meaning here. so can you use other character for test purpose? e.g.,

RewriteRule ^kalender-(.*)-(.*)-(.*) kalender.php?ini=$1&yr=$2&wk=$3 [QSA,L]
Reply With Quote
  #5  
Old 11-02-2012, 09:34 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
Quote:
Originally Posted by bobykus View Post
the same: kalender~Test~2012~44.php File not found ...
Enable rewitelog (just add 'RewriteLogLevel 9' in vhost section of httpd.conf). Look for [REWRITE] entries.
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 09:14 AM.



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