XHanch Studio Log in | Register | Cart

Forum

[How to] Set up Wor...
 
Notifications
Clear all

[How to] Set up WordPress custom permalink on Nginx environement

1 Posts
1 Users
0 Likes
936 Views
XHanch
(@xhanch-alt)
Posts: 2105
Member Admin
Topic starter
 

On Nginx environment, you may have problem setting up the WordPress custom permalinks since WordPress relies on Apache .htaccess redirects in the default installation.

You can put these codes to your nginx.conf:

location / {
    root /var/www;
    index index.html index.htm index.php;
    if (!-e $request_filename) {
        rewrite ^.*$ /index.php last;
    }
}

It should work with any permalink structures.

 
Posted : 27/09/2011 11:10 am
Share:

× Close Menu