rewrite rule not working

Discussion in 'Install/Configuration' started by shikha, May 21, 2006.

  1. shikha

    shikha New Member

    Hello,

    I am using cpanel with litespeed. I have enabled rewrite at server level and vhost level.

    The logs show that it reads my .htacess file fine but then I do not get redirected to the page i need to .

    Actually it should work as I create a folder from a blog and then it should work as

    http://folder.domain name --- should show http://domainname/folder

    As of now it goes juts to

    http://folder.domain name -- http://domainname


    Rewrite log is as below

    2006-05-20 23:05:59.753 [INFO] [62.43.158.27:65217-0#www.ipselon.biz] [REWRITE] Cond: Match 'hawaii.ipselon.biz' with pattern '^www\.ipselon\.biz?$', result: -1
    2006-05-20 23:05:59.753 [INFO] [62.43.158.27:65217-0#www.ipselon.biz] [REWRITE] Cond: Match 'hawaii.ipselon.biz' with pattern '^([^.]+)\.ipselon\.biz?$', result: 2
    2006-05-20 23:05:59.753 [INFO] [62.43.158.27:65217-0#www.ipselon.biz] [REWRITE] Source URI: '' => Result URI: '/index.php'
    2006-05-20 23:05:59.753 [INFO] [62.43.158.27:65217-0#www.ipselon.biz] [REWRITE] Last Rule, stop!
     
  2. ts77

    ts77 Well-Known Member

    what about posting your rewrite rule too?
     
  3. mistwang

    mistwang LiteSpeed Staff

    shikha,

    The log shows that the rewrite has been successfully executed. It might be a bug in your rewrite rule.
    Without knowing your exact rewrite rule, I can only give a wild guess here, "%n" instead of "$n" should be used for back references in rewrite conditions. Maybe you did not use "%1" to back reference the matched sub-string "hawaii" in the rewrite destination string?
     
  4. shikha

    shikha New Member

    thx

    Thanx I managed to sort it out
     

Share This Page