Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

How to add ".html" extension in the links?

jenisjenis New
edited October 11 in Vanilla 2.0 - 2.3

I have installed the vanilla forums inside a sub-directory and all things are working fine.

Now due to some requirements, I need to add ".html" to every link so would appreciate if you guys can help here.

THis is my current Nginx file.

`server {
listen 80;
listen [::]:80;


    root /var/www/html/vanilla;
    index index.php index.html index.htm;

    # Root location
    location = / {
      return 301 /forum/;

    location /forum {
     try_files $uri $uri/ @vanilla;

    location @vanilla {
      rewrite ^/forum(.+)$ /forum/index.php?p=$1 last;

   location ~ \.php$ {

    fastcgi_pass unix:/run/php/php7.1-fpm.sock;
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    include fastcgi_params;
    #fastcgi_param X_REWRITE 1;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_intercept_errors on;



My vanilla version is 2.6.x


Sign In or Register to comment.