XF 2.2 A few Friendly-URL questions

RobParker

Well-known member
Before we enable friendly URLs I just had a few questions.

We use nginx so will need to get our host to add this to the config:

Code:
location / {
    try_files $uri $uri/ /xf/index.php?$uri&$args;
    index index.php index.html;
}

location /install/data/ {
    internal;
}
location /install/templates/ {
    internal;
}
location /internal_data/ {
    internal;
}
location /library/ { #legacy
    internal;
}
location /src/ {
    internal;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include         fastcgi_params;
}

1) With XF installed directly in our public_html folder, is "/" the correct location? I'm pretty sure it is from seeing other replies.

2) Once this is added to our config, do we need to immediately switch to friendly URLs? i.e. does this rediect stop the existing URLs from working at all? This is really a question about timing I guess. If our host switches the server config over, do we need to coordinate and be ready to flip the switch in the ACP at the same time? Or will our non-friendly version keep working even with this in the server config.

3) XF is installed in public_html but we have a directory /public_html/forums/ as that's where VB used to be installed and nowadays just contains Kier's VB redirect scripts. Will that clash with the friendly URLs, as sitename.com/forums is both a real path and (I think) the friendly url for /index.php?=forums/. If it will clash, which way will it clash? I guess if it does clash, we could just delete the /forums/ directory and the old VB redirect scripts as it's been years now.
 
Last edited:
Back
Top Bottom