integer-net / magento2-rewritemap
Generate RewriteMap files for Apache from Magento URL rewrites
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 8
Forks: 0
Open Issues: 1
Type:magento2-module
Requires
- php: ~7.2||~7.3||~7.4
- magento/framework: ^102.0.0||^103.0.0
- magento/module-store: ^100.0.2||^101.0
- magento/module-url-rewrite: ^100.0.2||^101.0.0||^102.0.0
Requires (Dev)
- magento/magento-coding-standard: @dev
- pds/skeleton: ^1.0
- phpro/grumphp: ^v0.21.0
- phpstan/phpstan: ^0.12.0
- phpunit/phpunit: ^6.0|^9.0
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-11-06 02:18:24 UTC
README
Generate RewriteMap files for Apache from custom Magento URL rewrites (redirects). This can be useful to re-use the rewrites in a different frontend.
For example, to use the redirects in Vue Storefront, a reverse proxy that uses the generated rewrite maps can be configured.
Installation
-
Install it into your Magento 2 project with composer:
composer require integer-net/magento2-rewritemap
-
Enable module
bin/magento setup:upgrade
Configuration
In your store configuration navigate to Catalog > SEO:
- Enable Rewrite Maps Generation: set to "yes" to enable (Default: no)
- Rewrite Maps Generation Cron Schedule: configure, when rewrite maps are regenerated (Default: every hour)
Usage
Rewrite maps are stored in var/rewrite_maps
as one text file per store and redirect type (301, 302).
See http://httpd.apache.org/docs/current/rewrite/rewritemap.html for details how to use those files.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Testing
Unit Tests
vendor/bin/phpunit tests/unit
Magento Integration Tests
-
Configure test database in
dev/tests/integration/etc/install-config-mysql.php
. Read more in the Magento docs. -
Copy
tests/integration/phpunit.xml.dist
from the package todev/tests/integration/phpunit.xml
in your Magento installation. -
In that directory, run
../../../vendor/bin/phpunit
Security
If you discover any security related issues, please email bd@integer-net.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.