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 – .htaccess assistance with rewrite rule

I have trouble rewriting virtual directories as variables.. can someone help please? The URL is: https://www.example.com/content/index.php?var=1-dKein4i59xcNjfks I want it to look like: https://www.example.com/content/featured/1-dKein4i59xcNjfks where "content" is a real directory and "featured" and "1-dKein4i59xcNjfks" are virtual my current .htaccess code is…

VIEW QUESTION
Back To Top
Search