relp with mod rewrite

Discussion in 'PHP' started by animatronico, Sep 4, 2007.

Thread Status:
Not open for further replies.
  1. #1
    can some body post the cod to make my .php pages static
    I got two pages on www.mysite.com one is of course index.php and the other is about.php I've been looking on some codes but I got really confuse

    what do I put in my .htaccess after this?

    rewriteEngine On
    rewriteBase /

    please help :confused: :confused: :confused:
     
    animatronico, Sep 4, 2007 IP
  2. SoniCute

    SoniCute Active Member

    Messages:
    585
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #2
    more details please,do you want remove ending index.php or what?
     
    SoniCute, Sep 4, 2007 IP
  3. easterwolf

    easterwolf Well-Known Member

    Messages:
    608
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Im not sure I understand what you want done, so I can't just give it to you. Here is a link that will help you and is worth the short read anyway for future reference. LINK

    good luck
     
    easterwolf, Sep 4, 2007 IP
  4. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    it's make the index.php and about.php look like .html for SEO
     
    animatronico, Sep 4, 2007 IP
  5. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks I'll have a look and see if I can learn :)
     
    animatronico, Sep 4, 2007 IP
  6. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ok here is the page if you see you'll be able to see it. the reason why I made in PHP instead of html is so I can put a paypal donation tracker.
    http://www.jordanramos.com if you navigate to the about page you'll see www.jordanramos.com/about.php I would like to make it look like thesitename.com/about.html
     
    animatronico, Sep 4, 2007 IP
  7. easterwolf

    easterwolf Well-Known Member

    Messages:
    608
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    108
    #7
    man you can sure do flips LOL!
    try this..

    RewriteEngine on
    RewriteBase /
    RewriteRule ^index\.php$ index.html
    RewriteRule ^about\.php$ about.html
    [T=application/x-httpd-php]
    Code (markup):
    This isn't usually my area so its not positive, try it, I'm pretty sure that will do it.
     
    easterwolf, Sep 4, 2007 IP
  8. easterwolf

    easterwolf Well-Known Member

    Messages:
    608
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    108
    #8
    Oh, you may or may not have to add

    Options +FollowSymLinks depending on your server config.
    like this..
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^index\.php$ index.html
    RewriteRule ^about\.php$ about.html
    Code (markup):
    let us know how it goes
     
    easterwolf, Sep 4, 2007 IP
  9. easterwolf

    easterwolf Well-Known Member

    Messages:
    608
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    108
    #9
    Well? did it work?
     
    easterwolf, Sep 4, 2007 IP
  10. IeD3vil

    IeD3vil Banned

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    RewriteRule ^pagename-(.*).html$ page.php?params=$1
     
    IeD3vil, Sep 4, 2007 IP
  11. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    hi there I've tryed both options still show the same about.php and index.php
     
    animatronico, Sep 5, 2007 IP
  12. downloadthenet

    downloadthenet Active Member

    Messages:
    497
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #12
    downloadthenet, Sep 8, 2007 IP
  13. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #13
    ok,

    Once you have made the changes in .htaccess

    you have to change all the links from

    about.php

    to

    about.html

    The name of the page after the mod rewrite is about.html

    about.php will still be accesible, but if you want about.html then you have to type that address in,

    that help?
     
    Silver89, Sep 9, 2007 IP
  14. animatronico

    animatronico Banned

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    it's all working now thanks ;)
     
    animatronico, Sep 10, 2007 IP
    Silver89 likes this.
Thread Status:
Not open for further replies.