I am working on codeigniter when I used it on xampp server it worked pretty well with this Url localhost.com/realestate/index.php?class/method/parameter
But when I put similar thing on godaddy host
Same Url segment is showing codeigniter 404 error
Add .htaccess
for your folder. Here is some result Check it out all the links.
Host is Case-Sensitive so be careful with naming of Controller and model names as well
DirectoryIndex index.php index.html
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteBase /yourfoler/
RewriteCond $1 !^(index\.php|assets|install|update)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# For godady Shared Hosting Server uncomment the line below
RewriteRule ^(.*)$ index.php?/$1 [L]
# Please comment this if you have uncommented the above
# RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]
</IfModule>
localhost.com/realestate/index.php?class/method/parameter
instead of this you can localhost.com/realestate/class/method/parameter
run like this with this following htaacess
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.