ZenphotoCMS Forum
NGINX - How do I strip 'index.php' from all my URLs? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: NGINX - How do I strip 'index.php' from all my URLs? (/thread-13836.html)



NGINX - How do I strip 'index.php' from all my URLs? - Evert - 27-04-2023

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...




NGINX - How do I strip 'index.php' from all my URLs? - acrylian - 27-04-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/




NGINX - How do I strip 'index.php' from all my URLs? - Evert - 27-04-2023

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




NGINX - How do I strip 'index.php' from all my URLs? - fretzl - 27-04-2023

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



NGINX - How do I strip 'index.php' from all my URLs? - Evert - 27-04-2023

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




NGINX - How do I strip 'index.php' from all my URLs? - fretzl - 27-04-2023

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




NGINX - How do I strip 'index.php' from all my URLs? - Evert - 27-04-2023

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




NGINX - How do I strip 'index.php' from all my URLs? - fretzl - 27-04-2023

Yeah, looks ok.