mode rewrite question

Discussion in 'PHP' started by shadow_boi, Jan 28, 2009.

  1. #1
    shadow_boi, Jan 28, 2009 IP
  2. bestbeach

    bestbeach Banned

    Messages:
    177
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Change your permalink setting to /%postname%.html and update mode rewrite to
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
     
    bestbeach, Jan 28, 2009 IP
  3. shadow_boi

    shadow_boi Peon

    Messages:
    374
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you for you quick reply.

    But i just want to do it for the "about" page, but not others. (sounds stupid, but ya, only that "about" page)

    Can you tell me how to do that?

    Thanks a lot.
     
    shadow_boi, Jan 28, 2009 IP
  4. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #4
    RewriteRule ^about$ about.html [L]
     
    gapz101, Jan 28, 2009 IP
  5. shadow_boi

    shadow_boi Peon

    Messages:
    374
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hm... it doesn't work for this:

    RewriteRule ^free-game-downloads$ free-game-downloads.html [L]

    my site: http://www.km603.com/free-game-downloads

    Here is what I have so far:
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteRule ^free-game-downloads$ free-game-downloads.html [L]
    </IfModule>
    
    # END WordPress
    
    Code (markup):
     
    shadow_boi, Jan 28, 2009 IP
  6. yoavmatchulsky

    yoavmatchulsky Member

    Messages:
    57
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #6
    change the order:
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^free-game-downloads$ free-game-downloads.html [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    Code (markup):
    btw, if that page is already indexed in search engine, i suggest you add a 301 header to it, so that it retains his status and links - [L,R=301] instead of [L]
     
    yoavmatchulsky, Jan 29, 2009 IP
  7. shadow_boi

    shadow_boi Peon

    Messages:
    374
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    hmmm. thats wierd. It doesn't work either. It gave me 404 not found as before.

     
    shadow_boi, Jan 29, 2009 IP