setting con.f untuk subdirectory

Discussion in 'VPS (Virtual Private Server)' started by KOSHOSTING, 17 Jun 2015.

Thread Status:
Not open for further replies.
  1. KOSHOSTING

    KOSHOSTING Beginner 2.0

    Messages:
    20
    Likes Received:
    2
    Trophy Points:
    3
    #‎TANYA_NGINX‬
    Saya menggunakan vps, panel webuzo, dan nginx, dengan cms wordpress.

    bagaimana ya cara agar bisa mendeteksi multipath, saya menginstall wordpress di subdirectory.

    public_html/namadomain/sub1/index.php
    public_html/namadomain/sub2/index.php
    public_html/namadomain/index.html

    Yang jadi masalah waktu saya setting seperti ini :
    location / {
    try_files $uri/ $uri /sub1/index.php?$query_string;
    }

    akan muncul masalah ketika mengakses sub2/index.php?$query_string akan mengarah ke sub1/index.php?$query_string (redirect)

    bagaimana agar ketika mengakses sub1 dan sub2 tanpa masalah redirect ke sub directory lain?
     
  2. paijo2

    paijo2 Apprentice 1.0

    Messages:
    233
    Likes Received:
    30
    Trophy Points:
    28
    coba berikut:

    Code:
            location /sub1 {
                    try_files $uri $uri/ /sub1/index.php?$args;
            }
    
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...