I am having difficulty getting one of my applications to use the htaccess file inside its path unless i point directly to index.php in the browser
I have installed on my computer ubuntu:
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily
I have installed on my computer apache:
Server version: Apache/2.4.12 (Ubuntu)
Server built: Jul 24 2015 15:59:11
I have tried adding the following code to my /etc/apache2/apache2.conf
<Directory /var/www/html/pss/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
I also tried it like this too:
<Directory /var/www/html/pss/html>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
As you can see, this code points to the location /var/www/html/pss
. Inside my pss folder
i have an html
folder. Inside this html folder I have an .htaccess
and index.php
files.
If I point my browser to http://localhost/pss/html it does not work however if i go to http://localhost/pss/html/index.php it seems to work
I added inside my htaccess
an instruction: DirectoryIndex index.php
. This did not work. Here is my .htaccess
file:
SetEnv APPLICATION_ENV development
DirectoryIndex index.php
php_value session.auto_start 0
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
It sits at /var/www/html/pss/html/.htaccess
From what I can see it uses the htaccess when i go to the url/index.php but does not when i just go to the url by itself
If you need any further information please let me know.