¿SEO Friendly URL for Nginx php5-pfm?

Discussion in 'ISPConfig 3 Priority Support' started by S0ft, Feb 21, 2015.

  1. S0ft

    S0ft Member HowtoForge Supporter

    I saw that joomla uses a type URL of this /index.php/components/
    or /components/users/juan

    Is there any tutorial for php nginx or modified so that they can be read and not create 404?
     

    Attached Files:

    • dos.jpg
      dos.jpg
      File size:
      106.6 KB
      Views:
      5
    • uno.jpg
      uno.jpg
      File size:
      53.2 KB
      Views:
      5
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Add the following lines n the nginx directives field of the website:

    Code:
    location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
      return 403;
      error_page 403 /403_error.html;
      }
      location / {
      try_files $uri $uri/ /index.php?q=$uri&$args;
      }
      # caching of files
      location ~* \.(ico|pdf|flv)$ {
      expires 1y;
      }
      location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
      expires 14d;
      }
    
     
  3. S0ft

    S0ft Member HowtoForge Supporter

    For Moodle SEO friendly ispconfig3 nginx directives
    Code:
    # put your real site address here
    rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
    
    location ^~ / {
    try_files $uri $uri/ /index.php?q=$request_uri;
    index index.php index.html index.htm;
    
    location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    include fastcgi_params;
    }
    }
    
     

    Attached Files:

Share This Page