(please specify the URL of the site on which you are experiencing the problem)
Error Message
suffix: ?i=1
Other Information
I know this issue has been raised before and I have read them, I’m not a tech guy, just an English teacher so some of it is unclear.
As I understand this is something infinityfree does and cannot be avoided without paying money. If this is accurate, are there alternative hosting platforms that don’t do this?
The problem is that it makes the pages unviewable, you get a ‘page not found’ message, the page can only be accessed by navigating via the header links.
Hi! Welcome to the forum! The security system is not supposed to do that unless your website relies on URL parameters and queries such as ?i=1 to process which webpage needs to be loaded.
I visited your website and I got the same error message. It seems like there is a problem on how your website processes URLs. It assumes that ?i=1 is a file, which is not the real case.
Do you use PHP or plain HTML files? Can you provide the contents of your .htaccess file? I suspect a misconfiguration exists somewhere in your .htaccess file.
I had a quick look at your website and I think I see the issue. In your code, you do something like this:
$currentPath = $_SERVER["REQUEST_URI"];
However, please understand that the REQUEST_URI is NOT just the path. Like the name suggests, it’s the URI. And the URI also includes the query string. So when you access the URL https://nlslearn.com/?i=1, the REQUEST_URI will be /?i=1, which is probably not what you would expect there.
If you only want the path, you could try pulling it through the parse_url function to extract the path, or just cut the string at the ? character to remove the query part.