Username (e.g. epiz_XXX) or Website URL
epiz_32816834
Error Message
I don’t have any written error, but all my pages except index.php redirect to the 404 error page, in local, I don’t ave this problem.
epiz_32816834
I don’t have any written error, but all my pages except index.php redirect to the 404 error page, in local, I don’t ave this problem.
Please provide more info.
What is the url?
Can you screenshot your file directory structure?
Likely due to this
Can you comment out this statement for a start
This line may redirect to public folder at the base of the site. without, I need to move all the files
I think there are three reasons why it doesn’t work
Based on what I saw before your new hosting changes
I will mention only one (some have already been mentioned)
One of them is that sometimes it is necessary to specify the extension of the file being called
means example.php
not just a href = example>
you probably had some form of pretty urls that didn’t work for XY reasons
Apart from that, everything in the htdocs folder is public (available to everyone online)
unless you hide it with .htaccess file.
In addition, you now have a problem with the redirection loop in public
dir
I would suggest trying this .htaccess code instead (and removing all the rules you’ve tried yourself):
Looking at the code:
/public/something
go to something
. Which is fine if you want to prevent people from accessing the public folder directly, but doesn’t help ensure that accessing the URL /something.php
will load the files from /public/something.php
.Hey, I tried to set all my base files in the htdocs folder, without the .htaccess settings that I wrote before, and when I go to another page ( https://eflavs.cf/shop.php for example ), it is does again the 404’ error
You don’t need to set anything to the /htdocs
folder, that is already done by default
@CrafterHide are you sure that shop.php
exists on root?
check again with your FTP client
The page shop est just an example, all the others page does that too.
I just tested with an html file, and it loads, while all my php files are not loading
I opened the Network tab in the Developer Tools menu in my browser and tried to open the page.
In it, I see the URL http://eflavs.cf/shop.php loads, but responds with a redirect to https://eflavs.cf/shop?get=all. Because there is no file or directory named “shop” and no .htaccess rules to rewrite it, the server responds with a 404 not found error.
So the server seems to be working fine, but your code does not.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.