apache - Ubuntu 15.10 Server 64-Bit .htaccess ? trying to enable but I am having no luck -


i change line in folder etc/apache2/apache2.conf with: allowoverride none allowoverride all , make sure accessfilename .htaccess set correctly.

then enable rewrite using command:

sudo a2enmod rewrite 

then restart apache2:

sudo service apache2 restart 

this simple .htaccess code:

# 1 ---- establish custom 404 file not found page ----  errordocument 404 /index.php  # 2 ---- prevent directory file listing in of folders ----  indexignore *  #block hotlinking rewriteengine on rewritecond %{http_referer} !^$ rewritecond %{http_referer} !^http(s)?://(www\.)?mydomain.com [nc] rewriterule \.(jpg|jpeg|png|gif)$ style/logo/logo_icon.png [nc,r,l] 

then when access main index.php file: forbidden

you don't have permission access /index.php on server. server unable read htaccess file, denying access safe apache/2.4.12 (ubuntu) server @ mydomain.com port 80

the server system using is: ubuntu 15.10 server 64-bit cant seem figure out going wrong, new servers done amount of research seem still limited on abilities, appreciate :)


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -