Rewritemap based on querystring parameters?
3 posts
• Page 1 of 1
Rewritemap based on querystring parameters?
I have a section of the rewrite rules that contains a series of rules like so:
Is there a way to create a generic rule with a rewritemap rather than individual rules?
I.e. so that based on the value of "cat" in the querystrng, the querystring in the output URL can have a different value?
- Code: Select all
RewriteCond %{QUERY_STRING} ^cat=car.*$ [NC]
RewriteRule mqh/contact-form\.html page.gone?stat=410&typ=cat&cat=Wedding+Car+Hire [NC]
RewriteCond %{QUERY_STRING} ^cat=bal.*$ [NC]
RewriteRule mqh/contact-form\.html page.gone?stat=410&typ=cat&cat=Balloon+Decoration [NC]
Is there a way to create a generic rule with a rewritemap rather than individual rules?
I.e. so that based on the value of "cat" in the querystrng, the querystring in the output URL can have a different value?
Re: Rewritemap based on querystring parameters?
Hello.
Not sure if I cover all your requirements, but consider something like this:
And put in cat_map.txt file something like this:
Not sure if I cover all your requirements, but consider something like this:
- Code: Select all
RewriteEngine On
RewriteMap cat_map txt:cat_map.txt
RewriteCond %{QUERY_STRING} (?:^|&)cat=([^&]+) [NC]
RewriteRule mqh/contact-form\.html$ page.gone\?stat=410&typ=cat&cat=${cat_map:%1} [NC]
And put in cat_map.txt file something like this:
- Code: Select all
car Wedding+Car+Hire
bal Balloon+Decoration
- jammartinn1987
- Posts: 2
- Joined: 04 Nov 2017, 03:07
- Location: New York
Re: Rewritemap based on querystring parameters?
The writer has made a magnificent Post of 6 Dollar Essay. It takes after this the entirety considered saw validation that you cannot fight with the truth of the matter isn't always wide, the entirety has its amazing case. A dedication of appreciation is all collectively for this facts.
Click here, For more at 6 Dollar Essay | https://www.6dollaressay.com
Click here, For more at 6 Dollar Essay | https://www.6dollaressay.com
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 25 guests