I am currently working on an URL shortener for my blog, as the URLs have become very long over the years. Everything works well so far, only I do not get the second variable on the "redirect.php" resolved.
This should be from the following URL. http://example.com/bM/bla1.html --> content.php?alias=bM&ref=bla1
So far the call works on http://example.com/bM It will resolve correctly to the content.php?alias=bM
Unfortunately, I do not get the second variable resolved. I've already tried different instructions but unfortunately i don't understand RegExp very good.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteOptions MaxRedirects=1
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-zA-Z0-9_-]+)$ content.php?alias=$1 [L]
RewriteCond %{SERVER_PORT} !^443$
</IfModule>