Recursively adds a index.php
file in all given directories.
The tool home page and the support page: prestashop.modulez.ru. The full description, how to use and the stable release for download are available there.
php index.php (--add or --remove) (The directory path for recursively adding or removing the index.php) [The template path for adding the index.php file]
Example #1: adding new index.php
files without overwrite existing one.
php index.php --add ../../.. ./templates/redirect-to-previous-directory.php
Example #2: cleaning a directory of old index.php files.
php index.php --remove ../../..
These are templates for popular methods to prevent directory traversal:
- The template
error-404.php
is used to show error 404 - a page not found. - The template
redirect-to-previous-directory.php
is used to do the redirect to a previous directory.
Just download the archive and use the tool by described instruction. See homepage for the last stable release.
You can also use this tool in your project by adding the dependency directly to your composer.json
file:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/zapalm/auto-indexer"
}
],
"require": {
"php": ">=5.3",
"zapalm/auto-indexer": "dev-master"
},
- Become the patron or support me by Flattr to help me work more for supporting and improving this project.
- Report an issue.
- Give me feedback or contact with me.
- Give the star to the project.
- Contribute to the code.
Contributors must follow the following rules:
- Make your Pull Request on the dev branch, NOT the master branch.
- Do not update a version number.
- Follow PSR coding standards.
Contributors wishing to edit the project's files should follow the following process:
- Create your GitHub account, if you do not have one already.
- Fork the project to your GitHub account.
- Clone your fork to your local machine.
- Create a branch in your local clone of the project for your changes.
- Change the files in your branch. Be sure to follow the coding standards.
- Push your changed branch to your fork in your GitHub account.
- Create a pull request for your changes on the dev branch of the project. If you need help to make a pull request, read the Github help page about creating pull requests.
- Wait for the maintainer to apply your changes.
Do not hesitate to create a pull request if even it's hard for you to apply the coding standards.