Forum Moderators: phranque
So I'm using the above rule to rewrite files that look like this:
www.mySite.com/folder1/folder2/index.php?pic=1.jpg
to look like this:
www.mySite.com/mainFolder/subFolder/1.jpg/
This rules works great. The problem I am having is that I would prefer to put the .htaccess file that I currently put in mainFolder, in subFolder, so that I can apply this any other folders that are created later on, without having to add .htaccess files, because the people who will be creating the folders in the future lack the technical abilities to create and write .htaccess files.
Is there a rule that will allow me to put the above .htaccess folder, which currently resides in subFolder, into mainFolder, and still have these rules work?
Your first rule should have an "[L]" flag on it, to promote efficiency.
Also, be aware that adding a slash to the end of a filepath is 'bad form' according to the HTTP specification, since it implies that the URL designates a directory or the index page of a directory. You may have trouble with optimal search engine indexing of these unorthodox URLs in the future. As a result, I would recommend that you re-consider your motivation for adding these slashes to the end of image URLs.
x.z indicates a 'page' or an 'object' on a page.
xyz/ indicates a directory (or by extension, a directory index page).
Jim