Answer the question
In order to leave comments, you need to log in
How to make such a redirect with dynamic parameters?
How to make such a redirect?
https://dpos.space/randomblockchain/?chain=viz&blo... - https://dpos.space/viz/randomblockchain/?block1=35...
(as you understand, instead of viz there can be golos, steem. Instead values of GET parameters may be different).
I tried to implement something like this:
RewriteCond %{QUERY} ^chain=(.*)$&block1=(.*)$&block2=(.*)$?&participants=(.*)$ [NC]
And then stuck
Answer the question
In order to leave comments, you need to log in
RewriteCond %{QUERY_STRING} ^(|.*?&)chain=([^&]+)&?(.*)
RewriteRule ^randomblockchain/$ https://dpos.space/%2/randomblockchain/?%1%3 [R=301,L]
I'm not good at htaccess redirects, but what's stopping you from doing redirects in JavaScript?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question