Problem in Code

Discussion in 'PHP' started by newbie191, Jul 24, 2009.

  1. #1
    I am testing a free script in this location

    http://moviejunkyard.com/test/test/
    Problem is whenever I click on a joke or joke categories It gives this error



    Not Found

    The requested URL /test/test/joke-archives-4.html was not found on this server.

    I believe this problem is due to some error in my .htaccess file.
    The current contents of .htaccess are

    RewriteEngine on
    RewriteBase /
    RewriteRule ^/test/test/viewjokes-(.*).html /test/test/viewjokes.php?id=$1 [L,QSA]
    RewriteRule ^/test/test/joke-archives-(.*).html /test/test/joke-archives.php?cat_id=$1 [L,QSA]
    RewriteRule ^/test/test/joke-archives-(.*)-(.*).html /test/test/joke-archives.php?cat_id=$1&start=$2 [L,QSA]
    RewriteRule ^joke-archives-(.*)-(.*).html /joke-archives.php?cat_id=$1&start=$2
    RewriteRule ^links(.*).html /links.php?start=$1
    RewriteRule ^help\.html$ /help\.php
    RewriteRule ^links\.html$ /links\.php
    RewriteRule ^privacy\.html$ /privacy\.php
    RewriteRule ^feedback\.html$ /feedback\.php
    RewriteRule ^disclaimer\.html$ /disclaimer\.php



    Dont know what to do.:confused:
     
    newbie191, Jul 24, 2009 IP
  2. cont911

    cont911 Peon

    Messages:
    50
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try this:
    RewriteRule ^test/test/viewjokes-(.*).html /test/test/viewjokes.php?id=$1 [L,QSA]
    RewriteRule ^test/test/joke-archives-(.*).html /test/test/joke-archives.php?cat_id=$1 [L,QSA]
    RewriteRule ^test/test/joke-archives-(.*)-(.*).html /test/test/joke-archives.php?cat_id=$1&start=$2 [L,QSA]

    i.e. remove slash before /
     
    cont911, Jul 24, 2009 IP
    newbie191 likes this.
  3. newbie191

    newbie191 Notable Member

    Messages:
    1,961
    Likes Received:
    100
    Best Answers:
    1
    Trophy Points:
    260
    #3
    Tried it does not work.
    I dont know what am I doing wrong here.
     
    newbie191, Jul 24, 2009 IP
  4. jhoni.chen

    jhoni.chen Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try below if your htaccess file is on /test/test folder:
    RewriteRule ^joke-archives-([0-9]+).html joke-archives.php?cat_id=$1 [L,QSA]
    RewriteRule ^joke-archives-([0-9]+)-([0-9]+).html joke-archives.php?cat_id=$1&start=$2 [L,QSA]
     
    jhoni.chen, Jul 25, 2009 IP