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

Seo – Rewrite rule to resolve 2 use cases

I have a rewrite rule in my .htaccess file: RewriteRule ^projects/?([a-zA-Z0-9-]+)?/?([a-zA-Z0-9-]+)?$ /projects/$1/seo.$2.php For example, the following rule works fine and I would like to keep it as is: URL: domain.com/projects/book/read-more opens /projects/book/seo.read-more.php page What I need is, in addition, to…

VIEW QUESTION
Back To Top
Search