Rewrite external and internal on same link with SEO in mind
September 02, 2014 02:22AM

i have problems with preparing two rewrites since i fall to a loop when trying to solve if.

-->1. rewrite is external (301) --> -->

-->2. then execute actual php (internal) -->

I have tried:

location ^~ /index.php {
if ($args = "my_page")
rewrite ^.*$ "" permanent;


rewrite ^/my_page$ /index.php?my_page last;

Internal works just fine, but with external i fall in inf loop.

What is real solution?????
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 52
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready