Jump to content

Recommended Posts

Posted

Hi,

I just moved my files in from another server. On my old server, I was able to configure a file to give me php support within .htm files. I prefer this over using .php or.phtml extensions. How can I configure my account so that I may do this on TCH as well?

 

Thank you.

Roy

Posted

Mod rewrite or force type. Both are written into your .htaccess file.

 

If you do a Goolge on either of those, you'll turn up tons of info. I have used both methods successfully at TCH.

 

I'd go into more detail but it's very involved and there is so much good info within one or two clicks on Goolge.

Posted

Hey I figured it out, thanks!

 

I just wanted to share what I did. The .htacess files are not viewable through FTP, but you can see them in the file manager in the CPanel. So make the .htaccess file locally and then upload to the folder.

 

Anyway, this is the information I put into my .htaccess file:

 

AddType application/x-httpd-php .htm

AddType application/x-httpd-php .html

ErrorDocument 401 /error_docs/401.htm

ErrorDocument 403 /error_docs/403.htm

ErrorDocument 404 /error_docs/404.htm

ErrorDocument 500 /error_docs/500.htm

ErrorDocument 501 /error_docs/501.htm

ErrorDocument 502 /error_docs/502.htm

ErrorDocument 503 /error_docs/503.htm

 

Just put this into the public_html folder and you should be good. I have not done much .htaccessing, so use at your own risk!

 

Roy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...