1. Forum
    1. Unerledigte Themen
  2. Artikel
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  4. Blog
    1. Artikel
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Forum
  • Blog-Artikel
  • Seiten
  • Erweiterte Suche
  1. StageTwo - Deine Wohlfühloase
  2. Software
  3. WBB SEO Plugin

No nginx warning

  • K.Rens
  • 9. Juni 2014 um 14:03
1. offizieller Beitrag
  • K.Rens
    Anfänger
    Punkte
    70
    Beiträge
    11
    • 9. Juni 2014 um 14:03
    • #1

    Hi,

    I tried removing the index.php from the urls.

    In the comments you write
    "wird nach dem Speichern eine Warnmeldung angezeigt. Wenn man diese durchließt und wie beschrieben drauf klickt, bekommt man die Nginx configuration die man einfügen muss."

    My webserver is nginx, but I do not get a warning message with explanation on what to add to the nginx config.
    I only get a green success message.
    How can I find out what to add to the nginx configuration file?

    Thank you.

  • K.Rens
    Anfänger
    Punkte
    70
    Beiträge
    11
    • 10. Juni 2014 um 22:34
    • #2

    Or can someone provide me with the .htaccess rewrite rule, so I can convert it myself to nginx?
    I just need the one to remove index.php

    Thank you

  • K.Rens
    Anfänger
    Punkte
    70
    Beiträge
    11
    • 11. Juni 2014 um 22:42
    • #3

    Ok, since nobody shared their .htaccess, I wrote following nginx configuration file:
    rewrite ^/blog/(.*)/$ /blog/index.php/$1/ break;
    rewrite ^/cms/(.*)/$ /cms/index.php/$1/ break;
    rewrite ^/filebase/(.*)/$ /filebase/index.php/$1/ break;
    rewrite ^/Board/(.*)/$ /index.php/Board/$1/ break;
    rewrite ^/User/(.*)/$ /index.php/User/$1/ break;
    rewrite ^/Thread/(.*)/$ /index.php/Thread/$1/ break;
    rewrite ^/([a-zA-Z]*)/$ /index.php/$1 break;

    Hopefully it helps someone.
    Note: it may still miss some pages if you have custom plugins or a different url structure.
    Note 2: I first tried a general rule, but then it also rewrote all the .css files.

  • FragSalat
    Administrator
    Reaktionen
    213
    Punkte
    26.013
    Beiträge
    4.923
    Blog-Artikel
    13
    • 12. Juni 2014 um 23:41
    • Offizieller Beitrag
    • #4

    Here my nginx conf part

    Zitat

    # Rewrite URL's without index.php to url with index.php
    if ($request_uri !~ .*index\.php.*) {
    rewrite ^/article/(.*) /article/index.php/$1 break;
    rewrite ^/file/(.*) /file/index.php/$1 break;
    rewrite ^/acp/(.*) /acp/index.php/$1 break;
    rewrite ^/(.*) /index.php/$1 break;
    }

    # Serve php files
    location ~ \.php {
    fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_index index.php;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    include fastcgi_params;
    }

    Alles anzeigen
    • Nächster offizieller Beitrag
  • K.Rens
    Anfänger
    Punkte
    70
    Beiträge
    11
    • 13. Juni 2014 um 23:41
    • #5

    Thank you!
    Glad to see it's so similar to what I wrote. :)

    Just 1 question:
    Why do you need following line?
    if ($request_uri !~ .*index\.php.*) {

    It seems to work just fine without it?
    The less if's you can have in your nginx config, the better ;)

  • FragSalat
    Administrator
    Reaktionen
    213
    Punkte
    26.013
    Beiträge
    4.923
    Blog-Artikel
    13
    • 22. Juni 2014 um 09:51
    • Offizieller Beitrag
    • #6

    i wrote this to check if the index.php is already included.
    Otherwise the rewrite will rewrite an url like this /index.php/Test to another index.php

    • Vorheriger offizieller Beitrag
  1. Datenschutzerklärung
  2. Impressum
Community-Software: WoltLab Suite™
  1. Navigation
  2. Forum
    1. Unerledigte Themen
  3. Artikel
  4. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  5. Blog
    1. Artikel
  6. Suche
  7. Optionen
    1. (placeholder)
  8. Aktueller Ort
  9. StageTwo - Deine Wohlfühloase
  10. Software
  11. WBB SEO Plugin
  1. Benutzer-Menü
  2. Anmeldung
  3. Registrierung
  4. Sprache
  5. Deutsch
    1. Deutsch
    2. English