w_b_x2017-02-25 01:11:31
Apache HTTP Server
w_b_x, 2017-02-25 01:11:31

Apache can't find the page, what should I do?

Good day!
I have a php script at:
At the same time, the address is being checked and you cannot put a dot, it is absolutely necessary to use exactly %2E. At the same time, the address looks correct, but the server returns a 404 error, despite the fact that everything is fine in the address bar.
How can I avoid the difference between %2E and "." on apache???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Immortal_pony, 2017-02-25

I'm sure you're on the wrong track, as urlencode was designed to avoid such collisions, but I'll try to help anyway.
In .htaccess or vurtual host settings add:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

...this will redirect all requests to index.php.
Well, in the index.php itself, already analyze the $_SERVER['REQUEST_URI'] variable and indicate which file to include / give.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question