Mod rewrite problem

Discussion in 'Apache' started by RyanDoubleyou, Jun 4, 2008.

  1. #1
    Hello all,
    I own tackypenguin.com and I need help on a mod rewrite problem.

    Right now I have the following code on my .htaccess file
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^/([a-zA-Z]+)$ /index.php?page=$1
    RewriteRule ^([a-zA-Z]+)/([a-zA-Z]+)$ /index.php?page=$1&do=$2
    </IfModule>
    Code (markup):
    Basically, I want it to take tackypenguin.com/user or any other word, and make it get tackypenguin.com/index.php?page=user or whatever word.

    Then, I would like it to have two directories, like tackypenguin.com/user/login and make it get tackypenguin.com/index.php?page=user&do=login.

    Right now when I try to do this, if i go to tackypenguin.com/user, it gives me my 404 error.
    Any help would be greatly appreciated.
     
    RyanDoubleyou, Jun 4, 2008 IP
  2. RyanDoubleyou

    RyanDoubleyou Peon

    Messages:
    86
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Problem fixed. forums.digitalpoint.com/showthread.php?t=871747
     
    RyanDoubleyou, Jun 4, 2008 IP