How to restart the server after changes to the .htaccess file?

After making changes to the .htaccess file, these do not seem to be actually taking effect - do I need to restart the sever for that to happen, and if so, how do I do that ?

Welcome

They take affect pretty much immediately, but you may need to clear your browser cache for your computer to update.

10 Likes

Okay.

I have the following .htaccess file in my htdocs folder:

DirectoryIndex index.php index.html index.htm index.py
LoadModule cgi_module modules/mod_cgi.so
ScriptAlias / /home/vol13_7/infinityfree.com/if0_35436491

Then I have the following Python script in /search/update-index.py:

#!/usr/bin/env python
#-*- coding:utf-8 -*-

print("Updating index …")

I was expecting to get the text from the print() call as response, but I get the raw script instead. What is wrong ?

InfinityFree does not support Python. The only backend language that is supported is PHP.

8 Likes

You can’t use Python on InfinityFree, though you can use it on premium hosting.

6 Likes

Please consider that not all Apache configuration can be used in a .htaccess file, and not all potential .htaccess directives are supported on our hosting. The LoadModule call for example must be done in the core server configuration file, Apache simply does not support loading modules dynamically for individual domains or directories.

Premium hosting does indeed support hosting Python apps. However, Python sites will be run through Passenger, not through mod_cgi.

6 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.