Welcome! Log In Create A New Profile

Advanced

Wordpress Permalink Change - Rewrite Wanted

Posted by PhillTheChill 
Wordpress Permalink Change - Rewrite Wanted
January 11, 2010 03:11PM
I have changed my Wordpress permalink structure from:

[b]/[/b]%year%[b]/[/b]%monthnum%[b]/[/b]%day%[b]/[/b]%postname%[b]/[/b]

TO

[b]/[/b]%postname%[b]/[/b]

But i'm not sure what to put in my nginx config file for the old links to be re-directed to the new ones. Heres a copy of my existing file:
[code]
server {
listen 80;
server_name www.servinghomeserver.com;
rewrite ^/(.*) http://servinghomeserver.com/$1 permanent;
}

server {
listen 80;
server_name servinghomeserver.com;
access_log /home/public_html/servinghomeserver.com/log/access.log;
error_log /home/public_html/servinghomeserver.com/log/error.log;

location / {
root /home/public_html/servinghomeserver.com/public/;
index index.php index.html;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /usr/local/nginx/conf/fastcgi_params;
fastcgi_param SCRIPT_FILENAME /home/public_html/waywiderweb.com/public/$fastcgi_script_name;
}
}

[/code]

I want to keep the existing code in there where www requests go straight to http - Please help and thanks in advance.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
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