2013-02-15 28 views
0

你好小夥子,所以就我而言,我自己重寫URL,這樣,而不是顯示http://www.site.com/page.php它顯示http://www.site.com/page並立即功能將無法正常工作的web.config文件。mod_rewrite的與web.config中如何激活GET功能呢?

這裏是web.config中的代碼:

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
     <rewrite> 
      <rules> 
       <rule name="Imported Rule 1"> 
        <match url="^(|/)$" ignoreCase="false" /> 
        <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" /> 
       </rule> 
       <rule name="Imported Rule 2"> 
        <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" /> 
        <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" /> 
       </rule> 
       <rule name="Imported Rule 3"> 
        <match url="^(.*)\.htm$" /> 
        <action type="Rewrite" url="{R:1}.php" /> 
       </rule> 
       <rule name="Imported Rule 4"> 
        <match url="^(|/)$" ignoreCase="false" /> 
        <action type="Rewrite" url="index.php?page={R:1}" appendQueryString="false" /> 
       </rule> 
       <rule name="Imported Rule 5"> 
        <match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" /> 
        <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" /> 
       </rule> 
      </rules> 
     </rewrite> 
    </system.webServer> 
</configuration> 

我如何可以讓PHP $ _GET功能的任何想法?

編輯:通過改變appendQueryString = 「false」 表示appendQueryString固定= 「真」 謝謝你的幫助!

+0

不,我沒有,它肯定沒有的伎倆,太感謝你了。 – Farouqxii 2013-02-15 03:06:49

+0

添加您的解決方案作爲一個答案,並接受它時,你可以,請 – tuespetre 2013-02-15 14:15:25

回答

0

這是因爲「appendQueryString =」 「因此更改屬性真正解決了這一問題做了。