I have a question, how can I do so that a user does not enter directly to an error page, like a 404 page something like that, but that he cannot enter by writing the address of that page in the url? It's just that I redirect to an error page with javascript, but I don't want users to enter directly, how can I do it? Thanks in advance.
With the htaccess file on your server you can put the following inside the .
If the first line is set to "rewriteEngine On" Leave it as it is and paste the following ones into the file.
The last line is an example. You can place either the path of your website or the path to a file that has redirection information inside.
copy and paste it without "example 2:"
When you have done this, the next thing would be to prepare the 404.php file with a nice library called sweet alert
With that you will redirect anyone who places a bad url of your page and you will send it to Google or the page that you want with a waiting message.
This will help you not to lose visits to your chat website. If it works for you, tell me, if not, I can help you a little more so that you can achieve it
Here I can show you what I do, and surely what you want to do
http://www.grupodiarca.com/intranet/404.php