I will give it a try when I get home tonight.
I have a copy of the new site up on my own server for development and testing, I just do not have remote access to the server from work as they have blocked all the ports and I have not spent the time to find a way around it yet.
About htaccess files. I notice that when I FTP an htaccess file out to the server I can see it as long as that FTP session is open but when I go back another time the files are not visible to me. I know they are there because they are still functioning.
How can I access the files I know to be there without direct access to the server? I can overwrite the files by copying new versions there but occasionally I need to look at one to see what version it was or what it's purpose is and do not want to overwrite it without looking it over.
And while on the subject of htaccess files, I would be tremendously grateful if you have a solution to my current dilema. I have posted on it before but received no responses.
I built a templated web system using htaccess and PHP.
My htaccess file is thus:
Code:
RewriteEngine on
RewriteRule \.(html|htm|php|php4|php5)$ /jfk/jfk2/proc.php?url=%{REQUEST_URI}&%{QUERY_STRING} [R]
I currently have the same htaccess file in every sub folder of jfk2. JFK is the root of the site and jfk2 is just a sub that I use while developing and testing. Eventually everything will migrate into the root.
I use the RewriteRule to intercept every page request and redirect it to a processing script passing the original URL and any query string parameters on the new URL.
The proc.php script parses out the request and any parameters then redirects to my index.php page passing in the values that tell the template which page was requested so it can load that page into the template and set the correct options for the navigation menu.
The problem currently is that I have to keep a separate copy of the htaccess file shown above in every sub folder off the root of the web site in order to capture the requests. I would like to have the htaccess file just exist in the root but think it might interfere with calls to the important files like index.php and proc.php.
I know very little about htaccess and have through lots of examples, trial and error come up with what I have above.
I have been looking for a way to tell the htaccess file to ignore requests going directly to the root but trap all calls to sub-folders.
Perhaps the total solution is one htaccess file in the root that tests if the request is to the root and directs it to index.php and any sub-folder requests do the rewrite to proc.php.
I am somewhat lost with the htaccess portion. It will take a lot more time reading/learning than I have available right now but I am trying to get the school's new site up and running.
I know I could make a sub-folder off the root and place all other sub-folders under that one with the htaccess file there as well but then that is something unusual for anyone maintaining the pages to have to remember and if they put their files off the root it breaks them out of the template.
Thanks for the help. I will play around with the above commands this evening.
At my age I still learn something new every day, but I forget two others.