October 15, 2019

What is the NGINX rewrite rule for Premium URL Shortener

Back à Solutions

To make our products work on NGINX, you will need to add a code in the conf file.

The following code has been tested and it works fine. Please note that this code must be added to nginx.conf and you will need restart your server for the change to apply. The code below should be added within the server { } block.

Premium URL Shortener version 6.0+

Make sure the document root is pointing to the /public directory located in the folder where the script is installed

location / {
      try_files $uri $uri/ /index.php?$query_string;
}

Premium Media Script

location / {
 if (!-e $request_filename)
    { 
        rewrite ^/admin/(.*)?$ /admin/index.php?a=$1 break;
        rewrite ^/(.*)$ /index.php?a=$1 last;
        break; 
    }
}

Was ce solution helpful?

Related Solutions

Site web en 7 jours

Site professionnel, en ligne en une semaine. Conçu pour convertir les visiteurs en clients.

Votre site web. En ligne en 7 jours ou moins. À partir de $999.

Solutions entreprise

Besoins complexes ? Nous avons construit des plateformes gérant plus de 10 M de requêtes par jour.

Construisons quelque chose que vos concurrents ne pourront pas copier.

GemPixel