Problem with extensions...

Discussion in 'Apache' started by cabelo, Aug 7, 2008.

  1. #1
    Hi there,

    I have a problem with extensions on Apache, there he goes:

    I had develop my sistems on a Ubuntu 8 server and I usually access the archives from the browser like this: page or index or wherever with no extension.
    And the links like this: <a href="home"> or <a href="contact"> for example.

    But I have to import the system to another server running a CentOS, but these links doens't work... I'll have to rewrite all the code replacing, for example a link like "contact" by "contact.php" ..

    But this configuration is set by default on my server and I don't know what I have to do to work on the other server... I've already serched for and readed for, but I've not found the answer..

    If anyone knows the answer, please HELP ME ! rsrs Thank you all !

    (PS.: Sorry about my english, I'm from Brazil :p)
     
    cabelo, Aug 7, 2008 IP
  2. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #2
    I think this would be the .htaccess code
    RewriteEngine On
    Rewritecond %{REQUEST_FILENAME} !-f
    Rewritecond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ $1.php [L,QSA]
     
    buldozerceto, Aug 8, 2008 IP