.htaccess not being loaded

April 6, 2014 1.6k views
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: Options FollowSymLinks AllowOverride All Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all AllowOverride All Order allow,deny allow from all I'm really struggling here :( can someone help me out please? Thanks a lot.
2 Answers
- 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.
- Sec: The presence of factor configuration of your web server applications.
- and Three: Applications you are running/using.

=========

There are a few different things in practice. I take an example, using a module or application.

Using module method:
https://github.com/aello/h5bp/blob/master/.htaccess

or Using application method:
https://codex.wordpress.org/htaccess

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)

- Note also on the configuration of your web server:
...
DocumentRoot /var/www ### here default

Options FollowSymLinks
AllowOverride None

### here default
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

...

Some time people make it like this:
...
DocumentRoot /var/www/sitename.com ### here root

Options FollowSymLinks
AllowOverride None

### here public
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

...

And make the web server hard to read, and can not even run at all or even be a problem on your system.

https://en.wikipedia.org/wiki/Htaccess
* Ugh, error on post a reply..
Note also on the configuration of your web server:
...
DocumentRoot /var/www (here default)

Options FollowSymLinks
AllowOverride None

Directory /var/www/ (here default)
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
...

Some time people make it like this:
...
DocumentRoot /var/www/sitename.com (here root)

Options FollowSymLinks
AllowOverride None

Directory /var/www/sitename.com/public_html (here public)
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
...
Have another answer? Share your knowledge.