Is this possible?

Discussion in 'Apache' started by LanceT, Feb 11, 2007.

  1. #1
    LanceT, Feb 11, 2007 IP
  2. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #2
    post your htaccess I'll fix it up.
     
    krakjoe, Feb 11, 2007 IP
  3. LanceT

    LanceT Peon

    Messages:
    279
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    this is all there is

    
    RewriteEngine On
    
    
    RewriteRule ^(.*)/ /index.php?view=view_profile.php&user=$1
    
    Code (markup):
    I tried adding
    RewriteRule ^(.*) /index.php?view=view_profile.php&user=$1

    But this gives me a 500 internal server error.
     
    LanceT, Feb 11, 2007 IP
  4. Pat Gael

    Pat Gael Banned

    Messages:
    1,331
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Dig deeper into this forum, Nintendo gave the solution to another member trying to do the same.

    Sorry, don't remember how to give you a replica of such coding.
     
    Pat Gael, Feb 11, 2007 IP
  5. Cybernaut

    Cybernaut Peon

    Messages:
    408
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Where you are getting 500 Internal server error, you are actually creating an infinite loop. Use this instead:

    RewriteEngine On
    
    RewriteCond %{REQUEST_URI} !^/index.php
    RewriteRule ^/([^/]+)/?$ /index.php?view=view_profile.php&user=$1
    Code (markup):
    RewriteCond will stop the rewriting process after first pass (otherwise apache continues rewriting again and again since RewriteRule matches everytime). It will match with and without trailing slash.
     
    Cybernaut, Feb 12, 2007 IP