0
我有很多外部鏈接是指向這個http://example.com/sub-dir/post_name/2010/10/10/用htacess文件重寫或重定向?
,我想將它們重定向到這個http://example.com/sub-dir/2010/10/10/post_name/
第一個環節是舊的URL結構,第二個是新的URL結構。
代碼,我曾嘗試:
Redirect 301 /sub-dir/([a-z0-9-]+)/(\d{4}\/\d{2}\/\d{2})/ http://example.com/sub-dir/$2/$1/
有人可以幫助我?
謝謝,你能解釋一下嗎?我想學習:) – user147 2011-12-22 17:05:18
爲什麼我的工作不正常?我的怎麼了? – user147 2011-12-22 17:06:06
@ user303832:希望對模式的解釋有所幫助。 – 2011-12-22 17:13:41