I am using mod rewrite to strip URL of the .php extension, but the client wants me to go even further and strip of extensions all src paths in <img>
. Is this doable via .htaccess, or maybe php? The only way I can think of now is JS but he wants it server side.
Add a .htaccess
file with the following line:
Options +MultiViews
Then you can access the files within a directory without the extension, as long as your filenames are unique it should work OK.
The .htaccess file should be placed at the lowest level within your file structure that you want this behaviour to occur.
This will work for all extension!