Add original .htaccess file from Lexiconga

This commit is contained in:
Robbie Antenesse 2019-05-27 23:51:28 -06:00
parent bed665f448
commit e806f53076
2 changed files with 15 additions and 2 deletions

View File

@ -9,8 +9,8 @@
"scripts": {
"start": "concurrently \"npm run watch-js\" \"npm run watch-php\"",
"watch-js": "parcel watch index.html view.html --public-url ./",
"watch-php": "cpx \"src/php/**/*\" dist -v -w",
"bundle": "parcel build index.html && cpx src/php/**/* dist",
"watch-php": "cpx \"src/php/**/{*,.*}\" dist -v -w",
"bundle": "parcel build index.html && cpx \"src/php/**/{*,.*}\" dist",
"serve-frontend-only": "parcel index.html",
"clear": "npm run clear-dist && npm run clear-cache",
"clear-dist": "rimraf dist/*",

13
src/php/.htaccess Normal file
View File

@ -0,0 +1,13 @@
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^view/([0-9]+)/([0-9]+)/?$ api/router.php?view=publicview&dict=$1&word=$2 [NC,L] # Handle word ids.
RewriteRule ^([0-9]+)/([0-9]+)/?$ api/router.php?view=publicview&dict=$1&word=$2 [NC,L] # Handle word ids.
RewriteRule ^view/([0-9]+)/?$ api/router.php?view=publicview&dict=$1 [NC,L] # Handle dictionary ids.
RewriteRule ^([0-9]+)/?$ api/router.php?view=publicview&dict=$1 [NC,L] # Handle dictionary ids.
#RewriteRule ^issues/?$ https://github.com/Alamantus/Lexiconga/issues [R=301,L] # Shorten issues url.
#RewriteRule ^updates/?$ https://github.com/Alamantus/Lexiconga/releases [R=301,L] # Shorten updates url.