I’d like to set up a redirect/rewrite in my .htaccess that does the following:
A few samples of redirects I’m trying to accomplish:
domain.com/08/04/10/file.php to domain.com/new/file.php
domain.com/06/01/11/file2.php to domain.com/new/file2.php
domain.com/07/12/07/file3.php to domain.com/new/file3.php
You get the idea. I don’t even know where to start – there are so many sub-directories and sub-sub-directories that my head is spinning. I want them all to go to /new/filename.php. There are 3 subdirectories I’m trying to redirect; /06/, /07/, and /08/. Each has 2 levels below it, and a few php files in the 3rd level. Any suggestions on how to start?
This should turn the first into the second.
I’ve assumed that you need the folder names as parameters in the PHP call, and that the folders will all be numeric, 2 characters, as it looks strangely like a 2-char-per-part data format … but if that’s not the case, let me know.