簡體   English   中英

在本地主機上找不到錯誤404

[英]Error 404 Not found on localhost

我已經在URL上的locahost上托管了一個腳本: http : //127.0.0.1/rent/

問題是,每當我運行腳本時,它就會給我“在此服務器上找不到所請求的URL /index.php”。 以下是我的.htaccess文件:

RewriteEngine on RewriteCond $1 !^(index\\.php|images|robots\\.txt|assets|install) RewriteRule ^(.*)$ /index.php?/$1 [L]

我用以下組合編輯了該行:此行:RewriteRule ^(。*)$ /index.php?/$1 [L]

組合:

/index.php
subdomain/index.php?
/subdomain/index.php?
subdomain/index.php
/subdomain/index.php

但沒有任何效果,請您在這里幫助我,謝謝

您是否嘗試過僅使用RewriteRule ^(.*)$ index.php?/$1 [L]

由於您的網址指向一個子文件夾,因此當您嘗試訪問http://127.0.0.1/rent時 ,其中的.htaccess文件將使用本地引用來指向http://127.0.0.1/index.php而不是http://127.0.0.1/rent/index.php

這是假設您將.htaccess放在localhost / rent /文件夾中

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM