theniteowl
Programmer
Hi all,
I want to use an htaccess file to rewrite the url passing the original path and any parameters along to the new file.
This is what I currently use:
The problem is that I currently have to place an htaccess file in every sub-folder of the site in order for it to work.
Is it possible to have an htaccess file in the root folder but set not to act upon requests to files in that root folder? The idea is to have it only act on sub folders off the root so the file can be placed in the root so it only has to exist in one place.
I know I could create a sub off the root to put the htaccess file in and then place all sub folders into that sub but that seems a bit messy having a whole folder level just to put in the htaccess file.
But it is problematic to have to have a copy of the htaccess file placed in every sub off the root individually, especially if someone comes in and creates a new folder which would not get the htaccess file automatically and thereby break the template this file is used for.
Thanks.
At my age I still learn something new every day, but I forget two others.
I want to use an htaccess file to rewrite the url passing the original path and any parameters along to the new file.
This is what I currently use:
Code:
RewriteEngine on
RewriteRule \.(html|htm|php|php4|php5)$ /tests/proc.php?url=%{REQUEST_URI}&%{QUERY_STRING} [R]
The problem is that I currently have to place an htaccess file in every sub-folder of the site in order for it to work.
Is it possible to have an htaccess file in the root folder but set not to act upon requests to files in that root folder? The idea is to have it only act on sub folders off the root so the file can be placed in the root so it only has to exist in one place.
I know I could create a sub off the root to put the htaccess file in and then place all sub folders into that sub but that seems a bit messy having a whole folder level just to put in the htaccess file.
But it is problematic to have to have a copy of the htaccess file placed in every sub off the root individually, especially if someone comes in and creates a new folder which would not get the htaccess file automatically and thereby break the template this file is used for.
Thanks.
At my age I still learn something new every day, but I forget two others.