Forum Moderators: coopster
One of my thoughts is this. A single user might have multiple stores. Each using the same privacy policy, TOU, etc. As a convenience to the user for maintainence I wanted to somehow have one copy of the content and "paste" it with a require() call.
I was hoping to do this with server variables but it isn't working as intended. This is what is happening:
I click on the privacy.php.
A 404 error is generated and goes to my custom page.
There is no reference to privacy.php in any of the variables (but the 404 custom page), hence my script crashes at this point (not literally but I'm unsure what to do).
What I thought would happen is:
-404 generated, goes to my custom page.
-I parse out out REQUEST_URI (or some variable) the intended page the user wanted to goto.
-I redirect to another file... one whose purpose is to find these shared content pages (i.e. privacy.php)
-This file checks a subdirectory created for this user for the file.
-The files checks a site-wide subdirectory for this file
-The file then redirects to the 404 page (really thats the secondary purpose, primary is to act as a template for the store) returns either the path to the content or 404 and a flag so there wont be an infinite redirect
All the code is in place except I don't know where I can find the page the user originally wanted. Can this be done?
I had to put a .htaccess file in my directory. For some reason thought the GUI interface provided by my hosting company would provide the same behavior. It doesn't.... w/.htaccess the REQUEST_URI is set to the value I was expecting not the custom 404 page.