Mac OS X Server: How to alias file extensions?

Discussion in 'Web Design and Development' started by maclover001, May 1, 2009.

  1. maclover001 macrumors 6502a

    maclover001

    Joined:
    Mar 25, 2008
    Location:
    Vancouver, Canada
    #1
    Some genius I'm trying to host a site for used ".php5" file extensions instead of ".php", and now it doesn't seem to work on my OS X server (It used to be hosted with GoDaddy).

    Is there a way to (a) get the .php5 file extension working, or (b) alias file extensions?

    Thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    In the httpd.conf there should be a line similar to,
    Code:
    AddType application/x-httpd-php .php .phtml
    A .php5 extension can be added here. You likely don't have access to the httpd.conf file though so you'll need to set this up through a .htaccess file and put that in your root directory of your site. That should work as long as your web host allows it.
     

Share This Page