我想重寫就像一個網址:URL重寫和mod_auth_token(Apache模塊)
我的目標: http://monsite.com/my_other_files/55e35373739efc04a34d408c7c28a7b9/50e084f6/my_video.mp4
我的真實路徑: http://monsite.com/my_files/55e35373739efc04a34d408c7c28a7b9/50e084f6/my_video.mp4
我的代碼在.htaccess
:
RewriteRule ^my_other_files/([a-zA-z0-9_-]/[a-zA-z0-9_-]/[a-zA-z0-9_-]*)$
my_files/$1/$2/$3 [QSA,L]
我該如何去做這件事?
謝謝你的快速反應,但我有404錯誤我的鏈接 – pjfnew
是'啓用mod_rewrite'?值得在這條規則上面加上'RewriteEngine on'並查看['mod_rewrite'文檔](http://httpd.apache.org/docs/current/rewrite/intro.html),我建議... –