NGINX - How do I strip 'index.php' from all my URLs?

Evert Member
edited April 2023 in General support

Can I make my URLs look prettier? 😎

example of what I have now: https://images.meulie.net/index.php?album=2012-Intrepid-Sea-Air-Space-Museum & https://images.meulie.net/index.php?album=2012-Intrepid-Sea-Air-Space-Museum&image=IMG-20121020-102813.jpg
I have mod_rewrite disabled, because when I enable it I get 404 on the image-pages...

Tags:

Comments

  • acrylian Administrator, Developer
    edited April 2023

    I have no experience with nginx. Since it to my knowledge does not support modrewrite you have to add rewrite rules to the server: perhaps this helps but I have no idea if it is still current: https://www.zenphoto.org/news/nginx-rewrite-rules-tutorial/

  • Evert Member

    I have the rules of https://www.zenphoto.org/news/nginx-rewrite-rules-tutorial/ in place .

    I'll see whether I can figure something out :)

  • fretzl Administrator, Developer

    Looks like your functions.php in the theme folder is causing trouble.

    Remove these lines. You don't need them anyway.

    zp_register_filter('themeSwitcher_head', 'switcher_head');
    zp_register_filter('themeSwitcher_Controllink', 'switcher_controllink');
    zp_register_filter('theme_head', 'css_head', 500);
    #enableExtension('zenpage', 0, false); //   we do not support it
    
  • Evert Member

    I don't see those lines in functions.php . You are referring to /themes/collections/functions.php , right?
    (I use the Collections-theme)

  • fretzl Administrator, Developer

    Yes, "Collections". Apparently I had an older version. Sorry.

  • Evert Member

    So the functions.php of my "Collections" is 100% ok? :)

  • fretzl Administrator, Developer
    edited April 2023

    Yeah, looks ok.

Sign In or Register to comment.