Jual alat otomatis

Sabtu, 27 September 2014

SETTING WORDPRESS .htaccess NGINX

How to put wordpress .htaccess at nginx webserver ?

get your .htaccess permalinks ,and convert it to nginx style at http://winginx.com/en/htaccess

open sudo nano /etc/nginx/sites-enabled/yourdomain
find this line

# deny access to .htaccess files, if Apache's doument root
# concurs with nginx's one
#
location ~ /\.ht {
        #deny all; --> comment this
               #inject this line from the web http://winginx.com/en/htaccess
                if (!-e $request_filename){
                rewrite ^(.*)$ /index.php break;
                }
}

restart the nginx webserver 
sudo service nginx restart

==========================
setting permalink wordpress Nginx

in /etc/nginx/sites-enabled
choose domain configuration which you want to config

sudo nano domainname.com
put this line

  location / {
                # This is cool because no php is touched for static content. 
                # include the "?$args" part so non-default permalinks doesn't break when using query string
                try_files $uri $uri/ /index.php?$args; --> put this line into location /
        }
 

2 komentar:

  1. Komentar ini telah dihapus oleh pengarang.

    BalasHapus
  2. Terima kasih gan atas sharingnya, ane sempet kepusingan masalah setting .htaccessnya. monggo mampir ke toko online ane di Jual Raspberry Pi

    BalasHapus