Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wordpress + nginx/ Rewrite rules?
- To: nginx-ru@xxxxxxxxx
- Subject: Wordpress + nginx/ Rewrite rules?
- From: "Piom" <nginx-forum@xxxxxxxx>
- Date: Sun, 17 Oct 2010 12:48:33 -0400
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To:Date; bh=SuR76K/GRWYlvMY8k6ry2cwiy635JW96hHsuM/zy8Fs=; b=PglCs6cfAsLTrEXPU9pMCcCLxEXXWR4drlF93Qupzd5/74DqqYCecdjN+ibqF/VpsfNJdzl7pVqxnCUs57u7R8/w4z4BUolYMQmlmsK5MfOM98CUVlxu6A1qYg17bdRA;
Добрый день.
Возникла ситуация. Переношу старый
сайт на wordpress.
Систему завел, включил permalinks. Возникла
следующая проблема.
Есть старые адреса вида
http://example.com/login-info.php и по хорошем нужно
сделать 301 редирект на новую страницу
http://example.com/login-info/
Прикладываю конфиг.
[code]
server {
server_name example.com;
access_log /var/log/nginx/piom.access.log;
root /opt/nginx-example;
index index.php;
location /admin {
auth_basic "Admin Zone";
auth_basic_user_file /home/example/.htpasswd;
}
location / {
rewrite /index.php /login/;
try_files $uri $uri/ @wordpress;
}
location @wordpress {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /opt/nginx-example/index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_NAME /index.php;
}
[/code]
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,141589,141589#msg-141589
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|