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.

  1. /01/02/03/myfile.php
  2. /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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -