.htaccess - Knowledge Base Archives - Hivelocity Hosting https://www.hivelocity.net/kb/tag/htaccess/ Dedicated Servers, Private Cloud & Colocation Mon, 18 Dec 2023 17:58:38 +0000 en-US hourly 1 https://wordpress.org/?v=6.6 redirect using .htaccess https://www.hivelocity.net/kb/redirect-using-htaccess/ https://www.hivelocity.net/kb/redirect-using-htaccess/#respond Sun, 14 Nov 2010 11:56:44 +0000 https://kb.hivelocity.net/?p=2603 1) Temporary Redirect : Redirect temp / https://www.test.com This will redirect https://test.com — to — https://www.test.com Redirect temp /folder https://www.test.com/folder This will redirect https://test.com/folder — to — https://www.test.com/folder 2) Permanant Redirect : Redirect permanent / https://www.test.com This will redirect https://test.com — to — https://www.test.com Redirect permanent /folder https://www.test.com/folder This will redirect https://test.com/folder — to — …

redirect using .htaccess Read More »

The post redirect using .htaccess appeared first on Hivelocity Hosting.

]]>
1) Temporary Redirect :

Redirect temp / https://www.test.com

This will redirect https://test.com — to — https://www.test.com

Redirect temp /folder https://www.test.com/folder

This will redirect https://test.com/folder — to — https://www.test.com/folder

2) Permanant Redirect :

Redirect permanent / https://www.test.com

This will redirect https://test.com — to — https://www.test.com

Redirect permanent /folder https://www.test.com/folder

This will redirect https://test.com/folder — to — https://www.test.com/folder

The post redirect using .htaccess appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/redirect-using-htaccess/feed/ 0
Turning off register globals through .htaccess file https://www.hivelocity.net/kb/turning-off-register-globals-through-htaccess-file/ https://www.hivelocity.net/kb/turning-off-register-globals-through-htaccess-file/#respond Sun, 14 Nov 2010 05:25:49 +0000 https://kb.hivelocity.net/?p=1973 Turning off register globals through .htaccess file You have in my .htaccess file the line: If you want the register globals off for your OS Commerce or zen cart installation then place the .htaccess file under the folders like /zencart directory ie /shop /catalog etc. Code: # to turn off register_globals php_value register_globals 0 NOTE: …

Turning off register globals through .htaccess file Read More »

The post Turning off register globals through .htaccess file appeared first on Hivelocity Hosting.

]]>
Turning off register globals through .htaccess file

You have in my .htaccess file the line:

If you want the register globals off for your OS Commerce or zen cart installation then place the .htaccess file under the folders like /zencart directory ie /shop /catalog etc.

Code:

# to turn off register_globals
php_value register_globals 0

NOTE: If you are running from the root directory, you should check both in FTP and via your Control Panel that you do not already have an .htaccess file so that you do not overwrite an existing one.

The post Turning off register globals through .htaccess file appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/turning-off-register-globals-through-htaccess-file/feed/ 0
Set register_globals through .htaccess https://www.hivelocity.net/kb/how-to-set-register_globals-through-htaccess/ https://www.hivelocity.net/kb/how-to-set-register_globals-through-htaccess/#respond Sun, 14 Nov 2010 04:55:50 +0000 https://kb.hivelocity.net/?p=1957 Issue: How to set register_globals through .htaccess The most common setting that clients want to change are the “register_globals” settings. If you want to enable register_globals, you will need to create a .htaccess file in your site’s main directory (or the main directory of your site that contains PHP hosting scripts). Your .htaccess file should …

Set register_globals through .htaccess Read More »

The post Set register_globals through .htaccess appeared first on Hivelocity Hosting.

]]>
Issue: How to set register_globals through .htaccess

The most common setting that clients want to change are the “register_globals” settings. If you want to enable register_globals, you will need to create a .htaccess file in

your site’s main directory (or the main directory of your site that contains PHP hosting scripts).

Your .htaccess file should contain the following line:

php_flag register_globals on

If you want to disable register_globals then your .htaccess file should contain the following line:

php_flag register_globals off

The post Set register_globals through .htaccess appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-to-set-register_globals-through-htaccess/feed/ 0
How do I prevent people from linking to my images? https://www.hivelocity.net/kb/how-do-i-prevent-people-from-linking-to-my-images/ https://www.hivelocity.net/kb/how-do-i-prevent-people-from-linking-to-my-images/#respond Sat, 13 Nov 2010 14:20:48 +0000 https://kb.hivelocity.net/?p=1615 Create an .htaccess file in your public_html directory with the following code: RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^https://(www.)?domain.com.*$ [NC] RewriteRule .(gif|jpg)$ - [F] Where domain.com is your domain.

The post How do I prevent people from linking to my images? appeared first on Hivelocity Hosting.

]]>
Create an .htaccess file in your public_html directory with the following code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https://(www.)?domain.com.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]

Where domain.com is your domain.

The post How do I prevent people from linking to my images? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-do-i-prevent-people-from-linking-to-my-images/feed/ 0
How do I display files of a directory in a browser? https://www.hivelocity.net/kb/how-do-i-display-files-of-a-directory-in-a-browser/ https://www.hivelocity.net/kb/how-do-i-display-files-of-a-directory-in-a-browser/#respond Sat, 13 Nov 2010 14:20:17 +0000 https://kb.hivelocity.net/?p=1612 If you want to list all files in a directory that doesn’t use an index.html (or index.php) file, you can create an .htaccess file with the following contents: Options +Indexes This will tell apache that you want to list all files in the directory.

The post How do I display files of a directory in a browser? appeared first on Hivelocity Hosting.

]]>
If you want to list all files in a directory that doesn’t use an index.html (or index.php) file, you can create an .htaccess file with the following contents:

Options +Indexes
This will tell apache that you want to list all files in the directory.

The post How do I display files of a directory in a browser? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-do-i-display-files-of-a-directory-in-a-browser/feed/ 0
PHP Parsing code https://www.hivelocity.net/kb/php-parsing-code/ https://www.hivelocity.net/kb/php-parsing-code/#respond Sat, 13 Nov 2010 08:17:35 +0000 https://kb.hivelocity.net/?p=1075 If php parsing is not working please put the following code in .htaccess file of the domain in question. Options +Includes AddType text/html .html AddHandler server-parsed .html  

The post PHP Parsing code appeared first on Hivelocity Hosting.

]]>
If php parsing is not working please put the following code in .htaccess file of the domain in question.

Options +Includes
AddType text/html .html
AddHandler server-parsed .html

 

The post PHP Parsing code appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/php-parsing-code/feed/ 0
Enable php code to work inside a .html / .htm file. https://www.hivelocity.net/kb/enable-php-code-to-work-inside-a-html-htm-file/ https://www.hivelocity.net/kb/enable-php-code-to-work-inside-a-html-htm-file/#respond Sat, 13 Nov 2010 07:31:34 +0000 https://kb.hivelocity.net/?p=1006 To get this to work you need to edit your httpd.conf file. Find the line that looks similar to this: AddType application/x-httpd-php .php and change it to look like this: AddType application/x-httpd-php .php .htm .html and all should be fine If the server is shared : Instead it can be put in .htaccess for the …

Enable php code to work inside a .html / .htm file. Read More »

The post Enable php code to work inside a .html / .htm file. appeared first on Hivelocity Hosting.

]]>
To get this to work you need to edit your
httpd.conf file.

Find the line that looks similar to this:
AddType application/x-httpd-php .php
and change it to look like this:
AddType application/x-httpd-php .php .htm .html
and all should be fine

If the server is shared :

Instead it can be put in .htaccess for the site.

AddType application/x-httpd-php .php .htm .html

Please restart httpd service after this

The post Enable php code to work inside a .html / .htm file. appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/enable-php-code-to-work-inside-a-html-htm-file/feed/ 0