1

On my last server I had a .htaccess file that completed the urls without redirecting, I didn't quite understand how this was configured, but I am sure it was in the .htaccess file.
All the documentations I read until now only handle one file extension to be replaced (.htm gets redirected to .html).

Lets say I have following files on my server:

0:   001.jpg
1:   002.jpg
2:   002.png
3:   staff.php

when I request example.com/001 file 0 gets displayed, in my searchbar is no extension to be seen
when I request example.com/002 I get the errorcode 404, since there are 2 files starting with "002"
when I request example.com/002.j I get the image 1
when I request example.com/staff I get the output of the staff.php

How can I let .htaccess do that?

2
  • stackoverflow.com/questions/34981045/… Does this answer your question? Commented Mar 3, 2020 at 19:37
  • @lorikku I don't see how this would complete any file extension. Or did I miss something? Commented Mar 3, 2020 at 20:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.