ZenphotoCMS Forum
Problem with hyphen in own pages after server-change - 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: Problem with hyphen in own pages after server-change (/thread-4173.html)



Problem with hyphen in own pages after server-change - Bilder-Freak - 2008-12-02

Hi

i switched my project to a bigger server and now i have the problem that my custom pages like /page/image-search/ are not working anymore. I figured out that its because of the hyphen in the page-name - if i remove the hyphen in the pagename it works fine.

But i dont want to change the page-names because people dont find what they search for anymore. Other pages like /page/search/tags/my-great-tag work fine, the problem is just occurring with my custom pages.

Can somebody imagine where this problem may come from? Maybe its something with the modrewrite-rules?

Thanks for your help in advance!




Problem with hyphen in own pages after server-change - sbillard - 2008-12-02

You might try URLencoding the page. What are you getting for an error? a 404? If so it should show you what the page looks like after the fetch. Maybe the '-' is being substituted with a space.




Problem with hyphen in own pages after server-change - Bilder-Freak - 2008-12-03

Hi sbillard,

thanks for your answer. I found the problem - it seems that the rewrite-rule like:

RewriteRule ^page/([A-Za-z0-9-_]+)/?$

doesnt work - but it works when i write:

RewriteRule ^page/([A-Za-z0-9_-]+)/?$

The only thing thats changed is the order of the rule. But hey - it works so why think about it Maybe someone else has got the same problem - try this to solve it.

bye




Problem with hyphen in own pages after server-change - sbillard - 2008-12-04

Glad you solved it, but there should be no difference. I guess we can change the rule so you won't have to make the change each release.




Problem with hyphen in own pages after server-change - Bilder-Freak - 2008-12-04

Great, thanks!