2012-09-01 62 views
0

我使用smarty模板加密的php程序。使用.htaccess或其他任何東西拒絕主鏈接

我想打開鏈接,如index.php?page=login與login.php中打開,所以我在.htaccesss在幾頁中使用改寫模式,例如

RewriteRule ^/*login.php$ /index.php?page=login [L] 

應該有錯誤,如

查詢
RewriteRule ^/*support.php?(.+)$ /index.php?page=support&%{QUERY_STRING} [L] 

它的工作原理,但我需要否認主的網址,以便當用戶進入的index.php?A =登錄手動什麼(或主頁)會顯示出來,他應該只/login.php打開鏈接。 有沒有辦法做到這一點?

有一點幫助,請...

回答

0

應該有coirresponding rewirterule工作之前的其他規則(!):

RewriteRule ^/*index.php?a=login$/[L]