2012-10-24 31 views
0
RewriteEngine on 
RewriteBase/
RewriteRule ^(.*)$ index.php?page=$1 

我的.htaccess文件出現錯誤。在我的索引頁上,我有一個PHP來檢查$ _GET ['page']是什麼,當我輸入domain.com/home時,它返回index.php使用mod_rewrite快速修復.htaccess

我想它,當我在domain.com/home

回答

0

鍵入您需要及時更新您的規則,從循環返回首頁。嘗試添加一個條件,防止重寫,如果URI已經index.php

RewriteEngine on 
RewriteBase/
RewriteCond %{REQUEST_URI} !index.php 
RewriteRule ^(.*)$ index.php?page=$1 
+0

謝謝林先生。像魅力一樣工作 –