directoryindex

    1熱度

    1回答

    我知道我可以使用 DirectoryIndex index.php products.php作爲默認文件。 但是,這可能使其與當前文件夾的變量,因此這將是這樣的: DirectoryIndex CurrentFolderName.php 或追加一些文字,如: DirectoryIndex CurrentFolderName+123.php 所以這將使默認文件如下: for www.mysi

    2熱度

    2回答

    你好我htaccesss文件,我把這個代碼,以確保我的目錄索引文件設置爲 v2013/index.html的 ,所以我把這個代碼 DirectoryIndex v2013/index.html 然後我想它看起來像mydomain.com/Welcome,所以我加.. RewriteEngine On RewriteRule ^Welcome$ v2013/index.html [L] 我

    1熱度

    1回答

    我試圖通過顯示特定頁面來阻止瀏覽子目錄中的文件,同時阻止了兩個URL上的重複內容。 我有幾個文件的子目錄,例如: www.example.com/subfolderA/pageone.html www.example.com/subfolderA/pagetwo.html www.example.com/subfolderA/pagethree.html 等 我不希望用戶訪問子目錄本身(www.e

    0熱度

    1回答

    我在基於ARM的電路板上使用Boa web服務器。 我希望使用cgi腳本作爲主頁。 在boa.conf,我使用選項 DirectoryIndex index.cgi 然而,在我的瀏覽器中輸入主機板的IP的時候,我得到的是錯誤403,頁面才能訪問,如果我手動將/index.cgi添加到地址欄。 當變回 DirectoryIndex index.html 一切工作正常。 我試過玩別名和Scri

    2熱度

    1回答

    如何將DirectoryIndex應用於Apache中的別名而不會導致錯誤403? 這導致響應頭200: http://localhost/呈現 http://localhost/index.html <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www DirectoryInd

    1熱度

    1回答

    在我.htaccess文件DirectoryIndex設置爲/page/main/home.html 因此,當我去www.thisexample.com瀏覽器的地址欄中顯示www.thisexample.com而實際加載www.thisexample.com/page/main/home.html。這一切都很好,但現在解決了這個問題: 任何.html無法找到鏈接到home.html的頁面。換句話說

    -1熱度

    2回答

    我有DirectoryIndex index.php,並希望include './';但我得到failed to open stream: Is a directory 我當然include substr($someString, -1)==='/'?$someString.'index.php':$someString;,但有一個更簡單的方法?也許在.htaccess或php.ini的東西? 不

    0熱度

    1回答

    我有一個cPanel託管帳戶,主域指向public_html。但是,要使目錄結構更好,我下面的代碼添加到public_html/.htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/www\.MyDomain\.com [NC

    0熱度

    1回答

    我最近在我的Oracle Linux計算機上用PHP(5.3)設置了我的Apache服務器(2.2)。最初,我創建了三個文件:index.html,index.php和countries.html。我相信(不記得100%),我在我的/var/www/html/文件夾中創建這些文件,並將這些文件被自動給予兩個所有者和組根權限。然而,當我複製我的index.html到我的主目錄(不是root),我不再

    1熱度

    2回答

    使用我當前的配置,每次鍵入something.com時,都會顯示app_dev.php,因爲我當前的重寫規則是正確的。但我要的是,如果用戶鍵入www.something.com它會自動引導到www.something.com/home 注:「家」是我包的下一個路由 這是我目前的配置 <VirtualHost *:80> # Admin email, Server Name (domain