Improve URLs

This commit is contained in:
grandeljay 2022-06-08 14:42:17 +02:00
parent c4fc9517d2
commit 01c5e08fad
2 changed files with 7 additions and 4 deletions

View file

@ -8,13 +8,16 @@
RewriteRule ^([a-z\-]+)$ /?page=$1 [QSA,L]
# Wishlists (My lists)
RewriteRule ^(wishlists)/([0-9]+)$ /?page=$1&id=$2 [QSA,L]
RewriteRule ^wishlists/([0-9]+)$ /?page=wishlists&id=$1 [QSA,L]
# Wish
RewriteRule ^(wish)/(\d+)$ /?page=$1&id=$2 [QSA,L]
RewriteRule ^wish/(\d+)$ /?page=wish&id=$1 [QSA,L]
# Wishlist
RewriteRule ^(wishlist)/([0-9a-f]{40})$ /?page=$1&hash=$2 [QSA,L]
RewriteRule ^wishlist/([0-9a-f]{40})$ /?page=wishlist&hash=$1 [QSA,L]
# Blog Post
RewriteRule ^blog/([a-z\-0-9]+)$ /?page=blog&slug=$1 [QSA,L]
</IfModule>
##-- When caching of gzipped JS and CSS files is used, enable this setting

View file

@ -84,7 +84,7 @@ class URL
explode('&', parse_url($target, PHP_URL_QUERY))
);
$flags = explode(',', substr($parts[3], 1, -1)) ?? array();
$parameters = query_to_key_value_pair($this->url);
$parameters = array_reverse(query_to_key_value_pair($this->url), true);
preg_match_all('/\(.+?\)/', $rewriteRule, $regexes);