.htaccess is not working


I have to create subdomain but .htaccess is not working because i have to some code in .htaccess so i need to write in this file so please give me solutions for why .htaccess is not working.


Check in httpd.conf if you have under virtualhost *:80 and virtualhost *:443 “All” right after “AllowOverride”:

AllowOverride All …

If you need to make changes dont forget to restart Apache once you saved the file.


Also, what problem is it that you’re having exactly?

You can look in $HOME/logs/error_log to see any errors that are showing up.

If you continue having problems, let us know what’s in your .htaccess file.



This is my .htaccess code:

RewriteEngine On

RewriteCond $1 !^(indx.php|resources|robots.txt)

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ indx.php?/$1 [L,QSA]

Options -Indexes

I have to call index.php so currently automatic index.php is called.

Did read my previous post and check Apache conf file?

Already add AllowOverride All in httpd.conf file.

you should have look at htaccess manual as that is not really issue with virtualmin. As you mentioned in your first post, you’ve done some changed or something to it which means problem is with your code in htaccess file.

are you sure it is indx.php instead of index.php, what are you trying to do