|
|
|
Working with your ".htaccess" files
To edit or create an .htaccess file on your main domain name, go to your web control panel, click on "Web hosting options" and click on the option that reads: "Edit your .htaccess manually".
Click here for detailed instructions on how to edit or create an .htaccess file for your subdomains.Using an .htaccess file you can perform many powerful functions in your ThirdSphere hosting account. However, for these to work the correct command must be used in the correct way. The overwhelming majority of questions we get on .htaccess files are about the following commands.
DirectoryIndex
Use this command to change your default home page. For example, if you want to see your index.php (or any other) file before your index.html file, which is the default, place the following command in your .htaccess file. The order of the page names after 'DirectoryIndex' will be the order that the pages are 'served' by the server.
DirectoryIndex index.php index.html
AddHandler (AddType)
To parse php code in your html file (running php coded files with an .html extension on them) add the following line to your .htaccess file:
AddHandler application/x-httpd-php htm html
Many programs and scripts suggest that you add an AddType line to your .htaccess file. For security reasons we use PHPSuexe which requires you to use AddHandler instead of AddType.
SetHandler (ForceType)
Some programs and scripts suggest that you add an ForceType line to your .htaccess file. For security reasons we use PHPSuexe which requires you to use SetHandler instead of ForceType.
SetHandler application/x-httpd-php
301 Redirect
A 301 redirect is an efficient and spider/visitor friendly strategy for redirecting to pages that have been moved. The code "301" is interpreted as "moved permanently".
There are two columns in a 301 redirect. The first is where you want to redirect from, the second where you want to redirect to.
For example, to redirect an entire web site to another site:
Redirect 301 / http://www.thirdsphere.com/
Or, to redirect just one page to another page:
Redirect 301 /old-page.html http://www.mydomain.com/new-page.html
Editing your .htaccess file
To edit your .htaccess file, simply open your web control panel, click on the "Web hosting options" section and select "Edit .htaccess manually".
If you want to edit (or create a new) .htaccess file on one of your subdomains, click here for detailed instructions.
|
|
|
|
|
|
|
|
|