Htaccess URL redirect by matching url string and parameters?

1. Rule for URL that ends with 1 : RewriteRule ^path1/path2/(^/+)-1/$ domain.com/target-page L,R=301 2. Rule for having var1 parameter in query string: RewriteCond %{QUERY_STRING} (^|&)var1=(^&*)(&|$) RewriteRule .

* domain.com/another-target-page L,R=301 NOTE: With these rules existing query string will be passed to a new URL as well (e. G path1/path2/wrong-url-1/? Say=meow will become domain.com/target-page?

Say=meow ). To drop it, add? At the end of target URL (e.

G domain.com/another-target-page? L,R=301.

1. Rule for URL that ends with -1/: RewriteRule ^path1/path2/(^/+)-1/$ domain.com/target-page L,R=301 2. Rule for having var1= parameter in query string: RewriteCond %{QUERY_STRING} (^|&)var1=(^&*)(&|$) RewriteRule .

* domain.com/another-target-page L,R=301 NOTE: With these rules existing query string will be passed to a new URL as well (e.g. /path1/path2/wrong-url-1/? Say=meow will become domain.com/target-page? Say=meow).

To drop it, add? At the end of target URL (e.g. domain.com/another-target-page? L,R=301.

Great. Thanks a lot. I Have added this .

RewriteRule ^wine/appellation/(.*)-1$ domain. Com/gifts? L,R=301 and it works perfectly.

But for Query string still its not working. I don't know what mistake am doing. Let me try t out more.

– Ela Sep 5 at 13:55 1 It's my fault (typo): should be % character and not $: change ${QUERY_STRING} to %{QUERY_STRING} – LazyOne Sep 5 at 14:04 Yes I was added % only and it was not working when I test it last day. Today certainly its worked. Thanks a lot – Ela Sep 6 at 11:15.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions