skip to Main Content

Php – .Htaccess Customize Query String

I am using the code below. RewriteCond %{QUERY_STRING} ^brands=(.*)&features=(.*)$ RewriteRule ^products/([_A-Za-z0-9-]+)$ index.php?brands=%1&features=%2 However, this requires both values. For example, it does not work when only the brand value is given. Example: x.com/?products?brands=2,4,5 Does not work Example: x.com/?products?brands=2,4,5&features=3,6,8 Works What causes…

VIEW QUESTION

Apache – Pretty URLs with .htaccess rewrite engine

Hej, I'm trying to achieve a pretty urls for my site with rewrite engine. The goal is this - mysite.dk/da, mysite.dk/da/success and mysite.dk/da#scroll. So far my htaccess file looks like this: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule…

VIEW QUESTION
Back To Top
Search