Report this

What is the reason for this report?

.htaccess not being loaded

Posted on April 6, 2014

Hi,

As it says in the title i cant get my .htaccess file to load. I have tried putting jibberish in it and it doesn’t work.

The htaccess is in /var/www/SITENAME.com/public_html. I have also added another htaccess to /var/www/SITENAME.com just incase. Mod rewrite is also enabled. The allow override file (not sure what its called) looks like this: <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>

    <Directory /var/www/SITENAME.com>
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

I’m really struggling here :( can someone help me out please? Thanks a lot.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
  • Ugh, error on post a reply… <br>Note also on the configuration of your web server: <br>… <br>DocumentRoot /var/www (here default) <br> <br>Options FollowSymLinks <br>AllowOverride None <br> <br>Directory /var/www/ (here default) <br>Options Indexes FollowSymLinks MultiViews <br>AllowOverride None <br>Order allow,deny <br>allow from all <br>… <br> <br>Some time people make it like this: <br>… <br>DocumentRoot /var/www/sitename.com (here root) <br> <br>Options FollowSymLinks <br>AllowOverride None <br> <br>Directory /var/www/sitename.com/public_html (here public) <br>Options Indexes FollowSymLinks MultiViews <br>AllowOverride None <br>Order allow,deny <br>allow from all <br>…
  • First: It’s hard to answer your question because many of the functions of the file (.htaccess) and the many ways that use and purpose. <br>- Sec: The presence of factor configuration of your web server applications. <br>- and Three: Applications you are running/using. <br> <br>========= <br> <br>There are a few different things in practice. I take an example, using a module or application. <br> <br>Using module method: <br>https://github.com/aello/h5bp/blob/master/.htaccess <br> <br>or Using application method: <br>https://codex.wordpress.org/htaccess <br> <br>We can see that the implementation is different. Even the WordPress application there are a variety of how to use them. Starting from Basic WP and WP Multisite and depending on the version you are using. It’s good you choose to use one of them and place them in the directory. (ex: /var/www/sitename.com/public_html) <br> <br>- Note also on the configuration of your web server: <br>… <br> DocumentRoot /var/www ### here default <br> <Directory /> <br> Options FollowSymLinks <br> AllowOverride None <br> </Directory> <br> <Directory /var/www/> ### here default <br> Options Indexes FollowSymLinks MultiViews <br> AllowOverride None <br> Order allow,deny <br> allow from all <br> </Directory> <br>… <br> <br>Some time people make it like this: <br>… <br> DocumentRoot /var/www/sitename.com ### here root <br> <Directory /> <br> Options FollowSymLinks <br> AllowOverride None <br> </Directory> <br> <Directory /var/www/sitename.com/public_html> ### here public <br> Options Indexes FollowSymLinks MultiViews <br> AllowOverride None <br> Order allow,deny <br> allow from all <br> </Directory> <br>… <br> <br>And make the web server hard to read, and can not even run at all or even be a problem on your system. <br> <br>https://en.wikipedia.org/wiki/Htaccess

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.