I've hosted a script on locahost on url: http://127.0.0.1/rent/
The problem is whenever I run the script it gives me "The requested URL /index.php was not found on this server." Below is my .htaccess file:
RewriteEngine on RewriteCond $1 !^(index\\.php|images|robots\\.txt|assets|install) RewriteRule ^(.*)$ /index.php?/$1 [L]
I've edited the line with following combinations: This line: RewriteRule ^(.*)$ /index.php?/$1 [L]
Combinations:
/index.php
subdomain/index.php?
/subdomain/index.php?
subdomain/index.php
/subdomain/index.php
but nothing has worked, request you to please help me out here,thanks
Have you tried just using RewriteRule ^(.*)$ index.php?/$1 [L]
?
Since your url is pointing to a subfolder, when you attempt to access http://127.0.0.1/rent , the .htaccess file inside there will use the local reference to point back to http://127.0.0.1/index.php rather than http://127.0.0.1/rent/index.php
This is assuming you are placing the .htaccess inside the localhost/rent/ folder
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.