WordPress htaccess redirect | NextGEN Gallery Pro - Lightbox

106 views Asked by At

I am using NextGEN Gallery Pro - Lightbox on my WordPress site which should redirect first-url to second-url automatically, but somehow it doesn't work and generates a blank page without any redirect when I visit the first url. I am thinking to add a manual htaccess rewrite rule to make this redirect possible.

How can I add htaccess rewrite rule to redirect

mywordpress_domain.com/nextgen-share/121212/8989/full?uri=/landscape-photography/

to

mywordpress_domain.com/landscape-photography/#gallery/121212/8989

This is the rewrite rule I've tried so far.

RewriteEngine On
RewriteRule ^(nextgen-share)/([\w\d\-]/([\w\d\-]+)/(full?uri=)?$/([\w\d\-]+)/ $3/#gallery/$1/$2 [L,R=301]

Thanks in advance.

1

There are 1 answers

0
Dipak G. On

Adding the following rewrite rule finally fixed the issue.

RewriteCond %{QUERY_STRING} ^uri=(/[^&]+)
RewriteRule ^nextgen-share/(\d+/\d+)/full$ %1#gallery/$1 [QSD,NE,R,L]