htaccess redirect issue

Discussion in 'Apache' started by cytech, Mar 5, 2008.

  1. #1
    Hey All,

    Here is my htaccess file:
    RewriteEngine On
    RewriteBase /


    RewriteRule ^categories/(.*)$ view_categories.php?s=$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) view_question.php?s=$1

    So basically how it works is:
    mydomain.com/questions

    This loads the index file - From here the user clicks on a question that is linked to like:
    mydomain.com/questions/question-title-slug

    This works great... Now when I add the categories... it loads the page however htaccess redirects it like 15 times before the page loads.

    Am I doing this right??
     
    cytech, Mar 5, 2008 IP
  2. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #2
    I think you should add [L]
    RewriteRule (.*) view_question.php?s=$1 [L]
     
    buldozerceto, Mar 7, 2008 IP