301 redirects

Discussion in 'HTML & Website Design' started by svetomir, Sep 28, 2005.

  1. #1
    I want to change all my pages from .htm to .php so I could use COOP. How do I go about creating 301 redirects?
     
    svetomir, Sep 28, 2005 IP
  2. jocs

    jocs Peon

    Messages:
    103
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    add this line to .htaccess file in the root of your site

    AddType application/x-httpd-php .php .htm .html
    Code (markup):
    And you'll be able to use php in any htm or html file, just put the code between <? and ?> tags.

    you don't have to make redirects, its easyer to tell your server that htm and html files can contain php code (the way to activate it is adding that line in .htacces file)
     
    jocs, Sep 28, 2005 IP
  3. svetomir

    svetomir Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I did .htaccess upload once and my whole web site went down. I had to phone administrators to remove it as the file was invisible to my ftp manager. That's why I want to go down 301 route.
     
    svetomir, Sep 28, 2005 IP
  4. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,200
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #4
    If your only intention is to use the coop, you can do so on .htm pages using the passthru method.
     
    dcristo, Sep 28, 2005 IP