Clean URL is enabled in my installation.
When visitors go to mysite/some_url, I want to have Drupal do this:
1) if /some_url exists
1.1) : if /some_url is a file path, show it (it shall be rendered via index.php and it shall be a normal node)
1.2) : if /some_url is a path to a directory, go to that directory and show index file
2) if /some_url does not exist:
2.1) : go to /archive (/archive is a physical directory) to visit /archive/some_url
2.2) : depending of if /archive/some_url is a path to a file or to a directory, either show a file or go to the destination directory to show index file
Any idea on how to do it? I asked this question here at http://www.webmasterworld.com/apache/3635920.htm
The problem is that it used to work, but suddenly it does not work anymore (or maybe it never worked, I just did not test correctly)
Thank you for help,
Comments
Current problem
by the way, current problem is :
If I created a node, say: test, when visiting mysite/test, it will go to mysite/archive/test IF /archive/test exists, instead of rendering the node.
PHP Code solution with Login Destination Module
bigheadfish,
If I understand your problem correctly you should be able to use something very similar to this.
I pieced this together digging around on several other sites. The I plugged this code in as a PHP snippet in the URL destination settings of the Login Destination module. If the member, staff member, or board member has not completed their Profile (using Content Profiles) then $valid returns false because of the 404 error, so the user is redirected to their user page, but if they have already completed their profile, then at their next login they are redirected to their profile page.
Thanks,
~T1TAN23~