npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

htaccess-configs-mydevil

v1.0.2

Published

.htaccess boilerplate configs for MyDevil hosting

Readme

MyDevil .htaccess Configs

Build Status

MyDevil .htaccess Configs is a collection of configuration snippets that can help your server improve the web site's performance and security, while also ensuring that resources are served with the correct content-type and are accessible, if needed, even cross-domain.

This is a fork of the Apache Server Configs prepared for MyDevil hosting.

Getting Started

There are a few options for getting the MyDevil .htaccess configs:

  • Download the zip archive
  • Install them via npm: npm install --save-dev htaccess-configs-mydevil

Inside the dist/ folder, you'll find a ready-to-use .htaccess file.

Usage

Copy the .htaccess file in the root of the website.

Custom .htaccess builds

Security, mime-type, and caching best practices evolve, and so should do your .htaccess file. In the past, with each new MyDevil .htaccess Configs release it was quite tedious to find out which .htaccess trick was just new or only had changes in certain nuances.

The build script with its re-usable and customizable build configuration lets you easily update your .htaccess file. Each new .htaccess build will contain the updated MyDevil .htaccess Configs source files, enabled or commented-out according to your settings in the htaccess.conf of your project root.

Configuration file: htaccess.conf

Allows you to define which module to enable or disable for your project. Just copy the default htaccess.conf from this repo into your project directory. Adjust to your needs, and/or add custom code snippets you need for your project. Its syntax is straight and pretty much self-explanatory:

# Example Module

title   "example module"
enable  "src/example-module/images.conf"
enable  "src/example-module/web_fonts.conf"
disable "src/example-module/not-needed.conf"
omit    "src/example-module/not-needed-at-all.conf"

... more modules ...

Disabling modules

For example, the “Cross-origin web fonts” snippet is always included in our pre-built .htaccess file and enabled. If your project does not deal with web fonts, you can disable or omit this section:

This will comment out the section:

disable  "src/cross-origin/web_fonts.conf"

…and this will exclude the section, saving lines in output:

omit  "src/cross-origin/web_fonts.conf"

Enabling modules

For example, the “Forcing https://” snippet is disabled by default, although being included in our pre-built .htaccess. To enable this snippet, change the disable keyword to enable:

enable "src/rewrites/rewrite_http_to_https.conf"

Adding custom modules

Imagine you're passing all requests to non-existing files to your favourite web framework. The according mod_rewrite snippet would go like this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

Store this snippet in a file, e.g. config/framework_rewrites.conf, and add a reference in your htaccess.conf:

# PROJECT MODULES
enable "config/framework_rewrites.conf"

Build script: build.sh

Dive into your project root and call the build script from wherever you cloned the repo. Here are three examples:

1. Create a default .htaccess
in current work directory. An existing htaccess.conf in this directory will be used; if none is present, the default configuration will apply.

$ path/to/htaccess-configs-mydevil/bin/build.sh

# Output looks like:
[✔] Build .htaccess
[✔] Moved in place: './.htaccess'

2. Custom output location
Just add output path and filename as parameter. By the way, if there's an existing .htaccess file, the build script will create a backup.

$ path/to/htaccess-configs-mydevil/bin/build.sh htdocs/.htaccess
[✔] Build .htaccess
[✔] Create backup: 'htdocs/.htaccess~'
[✔] Moved in place: 'htdocs/.htaccess'

3. Custom .htaccess configuration
Why not maintain your personal ~/htaccess.conf? This example creates a .htaccess in current work directory, according to your favourite settings you may have stored in your $HOME directory:

$ path/to/htaccess-configs-mydevil/bin/build.sh ./.htaccess ~/htaccess.conf

Support

  • MyDevil hosting

  • Apache v2.4.0+

  • Browsers:

    • Chrome
    • Firefox 4+
    • Internet Explorer 8+
    • Opera 12+
    • Safari 5+

Unsupported modules from original project

Custom error messages/pages

MyDevil does not support ErrorDocument. However, there is a workaround. You can create custom error pages in directory /errors/xxx.html when xxx is HTTP code.

Link to the official documentation (in polish): Własne strony błędów

Disable TRACE HTTP Method

Due to the lack of access to the main configuration, the option is not available.

Server-side technology information

MyDevil does not support Header unset. There is no workaround at the moment.

ServerTokens Prod

Due to the lack of access to the main configuration, the option is not available.

Compression

MyDevil does not support AddOutputFilterByType DEFLATE. However, there is a workaround. You can enable GZIP compression at your page settings.

Link to the official documentation (in polish): Strona WWW/PHP

Brotli/GZip pre-compressed content

Due to the lack of compression, the option is also not available.

ETags

MyDevil does not support Header unset. There is no workaround at the moment.

File concatenation

MyDevil does not support

Options +Includes
AddOutputFilterByType INCLUDES
SetOutputFilter INCLUDES

There is no workaround at the moment.

Contributing

Anyone is welcome to contribute, however, if you decide to get involved, please take a moment to review the guidelines:

Acknowledgements

MyDevil .htaccess Configs is only possible thanks to all the awesome contributors!

Apache Server Configs is only possible thanks to all the awesome contributors!

License

The code is available under the MIT license.