Please help me to make static pages from dynamic pages

Discussion in 'Apache' started by jennypretty, Jun 25, 2007.

  1. #1
    Hello,
    I have these:
    www.domain.com/index.php?page=register
    www.domain.com/index.php?page=login

    How do I make them to be:
    www.domain.com/register.html
    www.domain.com/login.html

    Can you please help me how to do it?

    Here is my .htaccess file:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^([0-9]+)\.html$ /index.php?page=register [QSA,L]
    RewriteRule ^([0-9]+)\.html$ /index.php?page=login [QSA,L]

    On the real live page, when I put www.domain.com/register.html , then some error occurred.

    Can you please help?

    Thanks.
     
    jennypretty, Jun 25, 2007 IP
  2. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #2
    I think this will work:
    
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^([a-z]+)\.html$ /index.php?page=$1 [L,NC]
    
    Code (markup):
     
    VimF, Jun 27, 2007 IP
    mushroom likes this.
  3. jennypretty

    jennypretty Active Member

    Messages:
    584
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Yes. It worked.
    Thanks.
     
    jennypretty, Jul 2, 2007 IP