Архив метки: rewrite

Nginx DLE Rewrite

server { listen 80; server_name site.com www.site.com; root /var/www/site.com; if ($host ~* ^(www\.radiomaster\.com\.ua)$ ){ rewrite ^/(.*)$ https://radiomaster.com.ua/$1 permanent; } rewrite ^/page/(.*)$ /index.php?cstart=$1 last; rewrite ^.*image.php(.*)$ /image.php$1 break; location / { rewrite «^/([0-9]{4})/([0-9]{2})/([0-9]{2})(/?)+$» /index.php?year=$1&month=$2&day=$3 last; rewrite «^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)(/?)+$» /index.php?year=$1&month=$2&day=$3&cstart=$4 last; rewrite «^/([0-9]{4})/([0-9]{2})(/?)+$» /index.php?year=$1&month=$2 last; rewrite «^/([0-9]{4})/([0-9]{2})/page/([0-9]+)(/?)+$» /index.php?year=$1&month=$2&cstart=$3 last; rewrite «^/([0-9]{4})(/?)+$» /index.php?year=$1 last; rewrite «^/([0-9]{4})/page/([0-9]+)(/?)+$» /index.php?year=$1&cstart=$2 last; rewrite… Читать далее »