I've a wordpress website running running nginx + php7-fpm. Wordpress url redirection

My clients wordpress websites is serving many 404 requests. After checking I could see that the 404 URLs are like

/wp-content/uploads/2015/8/a.png&_nc_hash=ASsvdeeknbhs

and it throws 404 error. But if we add a '?' after that filename, it will show the content. the working url was like

/wp-content/uploads/2015/8/a.png?&_nc_hash=ASsvdeeknbhs

How to set this redirection in nginx ? Please help me to achieve above redirection. Будем признательны за любые хорошие рекомендации.

0
задан 19 December 2016 в 15:00
1 ответ

Я искал временное/посредственное исправление. Мне помогли следующие правила перенаправления.

rewrite ^(.*)&_nc_eui2(.*)$ $1?&_nc_eui2$2 permanent;
rewrite ^(.*)&_nc_hash(.*)$ $1?&_nc_hash$2 permanent;
rewrite ^(.*)word(.*)$ $1newwordOLDWORD$2 permanent;

Надеюсь, это кому-нибудь поможет. :)

0
ответ дан 5 December 2019 в 09:05

Теги

Похожие вопросы