1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Change all .php to html? htaccess?

Discussion in 'Apache' started by smallbusinessboost, Jan 9, 2006.

  1. #1
    Is there a way for my to change or mod_rewrite all my php files so they are all html files?
     
    smallbusinessboost, Jan 9, 2006 IP
  2. Big 'G'

    Big 'G' Member

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    48
    #2
    You mean phyisical or just within the url
     
    Big 'G', Jan 9, 2006 IP
  3. smallbusinessboost

    smallbusinessboost Guest

    Messages:
    40
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry I should clarify what I'm trying to do:
    I just want search engine friendly urls but all my sites are php.
     
    smallbusinessboost, Jan 9, 2006 IP
  4. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Php files get indexed just fine, I can't imagine you'll benefit from this at all.
     
    blinxdk, Jan 9, 2006 IP
  5. smallbusinessboost

    smallbusinessboost Guest

    Messages:
    40
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Okay, thanks. I was just wondering since phpbb forums have mods to display the urls in html format in archives. I assumed this was for better search engine indexing?
     
    smallbusinessboost, Jan 9, 2006 IP
  6. Big 'G'

    Big 'G' Member

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    48
    #6
    Big 'G', Jan 9, 2006 IP
  7. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Try site:forums.digitalpoint.com inurl:"php?t" for a good example of lots of pages with variables indexed :)

    There might be an issue with ?id= and ?sid= though.
     
    blinxdk, Jan 9, 2006 IP
  8. smallbusinessboost

    smallbusinessboost Guest

    Messages:
    40
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    smallbusinessboost, Jan 9, 2006 IP
  9. vikingfromthenorth

    vikingfromthenorth Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hi, I am totally confused when it comes to the mod rewrite in the htaccess file.

    I got many links that I want to change, some of my links:

    index.php?page=......
    index.php?page=imageview&image=......
    index.php?page=articleview&article=......
    index.php?page=blogview&blog=......
    index.php?page=fileview&file=......

    Examples of the usage:

    www.mysite.com/index.php?page=home
    I want it to become www.mysite.com/home.html

    www.mysite.com/index.php?page=history
    I want it to become www.mysite.com/history.html

    www.mysite.com/index.php?page=contact
    I want it to become www.mysite.com/contact.html

    www.mysite.com/index.php?page=imageview&image=0
    I want it to become www.mysite.com/imageview/0.html

    www.mysite.com/index.php?page=articleview&article=0
    I want it to become www.mysite.com/articleview/0.html

    www.mysite.com/index.php?page=blogview&blog=0
    I want it to become www.mysite.com/blogview/0.html

    www.mysite.com/index.php?page=fileview&file=home
    I want it to become www.mysite.com/fileview/home.html

    I have tried many ways, but I can't get it to work, spent many hours and have been confused about it for days now.

    Please help me with a complete htaccess mod rewrite for my site.
     
    vikingfromthenorth, Jan 30, 2006 IP
  10. vikingfromthenorth

    vikingfromthenorth Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    No need for help, got it to work, I just had to spend some more time with it and try to understand its ins and outs
     
    vikingfromthenorth, Feb 1, 2006 IP
  11. DSR

    DSR Member

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #11
    ^how did you fix it? I am tryign to do the same thing. I keep recieving, "500: internal server error"

    (sorry for the 11 day bump, but this is relevant) :)

    EDIT: nevermind, figuring it out. Nice! :)
     
    DSR, Feb 12, 2006 IP
  12. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #12
    are you going to post YOUR findings?
     
    Solicitors Mortgages, Feb 13, 2006 IP
  13. salik

    salik Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Examples of the usage:

    http://php/myproject/index.php?mode=comparepackage
    I want it to become www.mysite.com/home.html

    plz tell me the some info about this what i do for easier and best way ?
     
    salik, Jan 21, 2007 IP
  14. TroyM

    TroyM Well-Known Member

    Messages:
    520
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #14
    Actually I was looking for an answer to my question on this forum related to SEF URL issues.. I saw the above question.. Try isapirewrite.com...
     
    TroyM, Nov 3, 2007 IP
  15. tonybogs

    tonybogs Peon

    Messages:
    462
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Use ForceType if you have acces to the server rather than htaccess.

    This is loaded into Apache at startup and you dont need to kill you disk scanning for htaccess files
     
    tonybogs, Nov 6, 2007 IP
  16. garbageman

    garbageman Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    RewriteEngine on
    RewriteRule ^([a-z0-9_]+)\.html$ /index.php?mode=$1 [NC,L]
     
    garbageman, Nov 6, 2007 IP
  17. ryanlashlee

    ryanlashlee Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    That totally helped me. Thanks. I needed it for a site-wide change to php pages (formerly all HTML pages). The links all work without updating them. Just changed the .htaccess file. Here's what I used:

    RewriteEngine on
    RewriteBase /Privately_Protect_My_Motorcycles/
    RewriteRule ^([a-z0-9_]+)\.html$ $1.php [NC,L]
     
    ryanlashlee, Apr 16, 2011 IP
  18. devonblzx

    devonblzx Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I don't think you'd have issues. Think about all the forums that get indexed with php.
     
    devonblzx, Apr 19, 2011 IP