Apache的Mod_rewrite的小小疑問 - Linux
By Dinah
at 2009-10-16T17:28
at 2009-10-16T17:28
Table of Contents
我現在的Apache已經能夠正常運作mod_rewrite
想請問一下Rewrite Rule的幾個問題
一:我現在有一個Rule的寫法為:
RewriteRule ^album/([^/\.]+)/?$ test.php?id=$1 [L]
這樣的話,我給的網址就是http://網域名稱/album/999
它會導向到http://網域名稱/test.php?id=999
想請問一下,我能不能不要寫album,而使用者只要直接打上網址http://網域名稱/999
就導向到http://網域名稱/test.php?id=99
二:
因為我的Rewrite Rule是寫在設定檔裡面,所以當我改了Rule之後,就非得重開Apache
有沒有辦法不要那麼麻煩
三:因為遇到一位MIS說,像這種網址轉換的方式,用程式就可以寫了,不需要改Server設
定,是不是真的可以阿,我怎麼覺得他是不會做,或是不想改,所以硬要叫人改程式
謝謝回答
--
想請問一下Rewrite Rule的幾個問題
一:我現在有一個Rule的寫法為:
RewriteRule ^album/([^/\.]+)/?$ test.php?id=$1 [L]
這樣的話,我給的網址就是http://網域名稱/album/999
它會導向到http://網域名稱/test.php?id=999
想請問一下,我能不能不要寫album,而使用者只要直接打上網址http://網域名稱/999
就導向到http://網域名稱/test.php?id=99
二:
因為我的Rewrite Rule是寫在設定檔裡面,所以當我改了Rule之後,就非得重開Apache
有沒有辦法不要那麼麻煩
三:因為遇到一位MIS說,像這種網址轉換的方式,用程式就可以寫了,不需要改Server設
定,是不是真的可以阿,我怎麼覺得他是不會做,或是不想改,所以硬要叫人改程式
謝謝回答
--
Tags:
Linux
All Comments
By Annie
at 2009-10-17T06:04
at 2009-10-17T06:04
By David
at 2009-10-20T23:04
at 2009-10-20T23:04
By Quintina
at 2009-10-22T10:29
at 2009-10-22T10:29
Related Posts
gcc install問題
By Brianna
at 2009-10-16T16:25
at 2009-10-16T16:25
ubuntu8.04的隨身碟問題
By Brianna
at 2009-10-16T14:07
at 2009-10-16T14:07
有些網站 Windows 連的上 Ubuntu 不行?
By Catherine
at 2009-10-16T12:13
at 2009-10-16T12:13
MAKE一直出現問題 已附上error message
By Cara
at 2009-10-16T12:06
at 2009-10-16T12:06
請教nedit
By Emily
at 2009-10-15T23:00
at 2009-10-15T23:00