Jump to content

[SOLVED] 404 Server Error when trying to view a page after the page name was changed


Marcel Stäheli
 Share

Recommended Posts

Hello
I have a page where I need to change the page name (Settings-Tab -> Name). I can save the page with the new name but when I try to view it, I get an 404 server error (not a Processwire 404 error).

I can change the page name to some other names and they work, but this particular one doesn't:
The old name is "systemsicherheit" (system security) and I need to change it to "informationssicherheit" (information security).
Variations of "informationssicherheit" also do not work.

I had this problem before a few time going back to processwire 2.8 with PHP5. 
I also tried creating a new page, instead of renaming one. but with the same result: I can create the page just fine, but when I try to view it, I get an error. If i rename the same page to just, for exampl, "p" with the same content, it gets displayed.

Right now, I'm using processwire 3.0.123 on IIS10 with PHP 7.2 I activated site->config.php->debug, but since it's a server error, it doesn't help.

A similar renaming problem happened to me before a few times with images that I uploaded. After the upload it would just display a blank tile in the image field (but no error of any kind, the image was just empty). I exported the image in different formats, nothing helped. Then I changed the filename to just a.jpg and it worked fine.

Could it be a some kind of general database error? I have no Idea.

Edited by Marcel Stäheli
Found a solution. See last post
Link to comment
Share on other sites

The last time I had a problem like this it was because a directory with the exact same name existed in the webroot. In this case, the request isn't routed to ProcessWire by Apache because the .htaccess by default let's through request for existing folders and files (!-f / !-d). But since that directory didn't contain an index.php / index.html, there was nothing Apache could display, so it resulted in a server-side 404 independent of ProcessWire. Not sure if this even applies to you if you are using IIS, but I'd check if you have a folder named "informationssicherheit" in your web root ...

Link to comment
Share on other sites

Sorry for the late reply.

I did check for folders in the webroot. There are no folders with that name there, or in any other directory. Thanks for the suggestion though.

I exported the site profile and installed it locally on my machine using XAMPP 3.2.2 and here the renamed page gets displayed without a problem.
It could be an IIS database problem. But I don't know how to go about diagnosing it. Any ideas?

Link to comment
Share on other sites

  • 2 weeks later...

I finally figured it out. IIS uses a web.config file instead of a .htaccess file.

In it there is the following code block:

<denyUrlSequences>
	<add sequence="inc" />
	<add sequence="info" />
	<!--<add sequence="module" /> -->
	<add sequence="sh" />
	<add sequence="sql" />
	<add sequence="\..*" />
</denyUrlSequences>

I commented out the info line, and the page loads as it should. I commented out the module line years ago, because I got an error when installing modules.
I assume the other errors I got through the years were, because some page names contained one of these terms.

This thread reminded me of it:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...