2017 © Pedro Peláez
 

library apachehtaccessin

image

jmbtechnologylimited/apachehtaccessin

  • Sunday, April 15, 2018
  • by jarofgreen
  • Repository
  • 1 Watchers
  • 5 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

ApacheHtaccessIn

Often when you get a Web App there will be several .htaccess files sprinkled through the app, and Apache will read these to make sure it serves the app properly., (*1)

Problem: it is better for performance if these configs are baked into Apache, instead of getting apache to look for .htaccess files., (*2)

http://httpd.apache.org/docs/current/howto/htaccess.html, (*3)

This library is a simple library that will search through a directory for .htaccess files and make them into an Apache config for you., (*4)

Use from the command line

Say you have this Apache Config, (*5)

<VirtualHost example.com>
    DocumentRoot /var/www/example.com/web
    <Directory /var/www/example.com/web >
        AllowOverride all
    </Directory>
</VirtualHost>

Check out the code and run, (*6)

php bin/ApacheHtaccessIn.php /var/www/example.com/web >> /var/www/example.com/apacheConfig

Then simply change your config to, (*7)

<VirtualHost example.com>
    DocumentRoot /var/www/example.com/web
    <Directory /var/www/example.com/web >
        AllowOverride none
    </Directory>
    Include /var/www/example.com/apacheConfig
</VirtualHost>

Reload or restart Apache. Done!, (*8)

Every time you do something that might change your .htaccess files, such as upgrade the app, you will need to rerun this and reload or restart Apache., (*9)

Note: the output file created contains complete paths. This means if you move the web app - say from /var/www/example.com/web to /websites/example.com/web you will need to rerun this., (*10)

Run from PHP

This can be included with composer: https://packagist.org/packages/jmbtechnologylimited/apachehtaccessin, (*11)

For an example of how to call the PHP classes, see bin/ApacheHtaccessIn.php, (*12)

License

BSD - for details see LICENSE.txt, (*13)

The Versions

15/04 2018

dev-master

9999999-dev https://github.com/JMB-Technology-Limited/ApacheHtaccessIn

  Sources   Download

BSD BSD-3-Clause

The Requires

  • php >=5.6.0

 

apache htaccess

15/04 2018

dev-travis

dev-travis https://github.com/JMB-Technology-Limited/ApacheHtaccessIn

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6.0

 

apache htaccess

25/03 2016

v0.1.0

0.1.0.0 https://github.com/JMB-Technology-Limited/ApacheHtaccessIn

  Sources   Download

BSD

The Requires

  • php >=5.3.0

 

apache htaccess