2016-01-22 115 views
1

如何隱藏php,html地址欄中的擴展名有htdocs文件夾。在htdocs文件夾中有index.php文件和folders.i想要顯示在地址欄中,如下所示:
'index.php?page = exams'is possible
我可以在我的exsting文件中添加任何代碼嗎?Htaccess - 如何重寫規則

+2

你嘗試過什麼到目前爲止? –

+0

[Remove .php extension with .htaccess]可能的重複(http://stackoverflow.com/questions/4026021/remove-php-extension-with-htaccess) – Onots

回答

0

要隱藏的文件擴展名,您可以使用htaccess的下面一行:

Options +Multiviews 

這將允許您訪問的index.php爲/ ,,指數

+0

感謝您的回答!.how to show www.example。 com/index?page = exam,考試文件夾中有exam.php。 –