mod rewrite - Mod_Rewrite Complicated! -
i'd set redirect/rewrite in .htaccess following:
a few samples of redirects i'm trying accomplish:
domain.com/08/04/10/file.php domain.com/new/file.php
domain.com/06/01/11/file2.php domain.com/new/file2.php
domain.com/07/12/07/file3.php domain.com/new/file3.php
you idea. don't know start - there many sub-directories , sub-sub-directories head spinning. want them go /new/filename.php. there 3 subdirectories i'm trying redirect; /06/, /07/, , /08/. each has 2 levels below it, , few php files in 3rd level. suggestions on how start?
rewriterule ^/([0-9]{2})/([0-9]{2})/([0-9]{2})/(.*)$ new/$4?d=$1,$2,$3 [l,r]
this should turn first second.
- /01/02/03/myfile.php
- /new/myfile.php?d=01,02,03
i've assumed need folder names parameters in php call, , folders numeric, 2 characters, looks strangely 2-char-per-part data format ... if that's not case, let me know.
Comments
Post a Comment