Expand my Community achievements bar.

Apache rewrite rule for 301 redirection

Avatar

Level 2

So i was experimenting with an apache rewrite rule

to redirect from /en-in/holidays/destinations/xyz-packages to /en-in/holidays/destinations/about-xyz/xyz-packages

Here is rewrite rule which i made

RewriteRule ^/en-in/holidays/destinations/(.*)-packages /en-in/holidays/destinations/about-$1/$1-packages [R=301,L]

Correct me if i am wrong , i am under the impression that $1 would be the captured string of (.*)

But the rewrite rule isn't behaving as its supposed to be.

Could someone please let me know , where am i making the mistake ?

P.S : i am pretty new to this

0 Replies