简体   繁体   中英

Codeigniter URL working locally but not on server

I've got a silly error somewhere. Locally I've been using:

localhost:8080/project/index.php/Welcome/emailsend/Name/PersonEmail/EmailMessage

Where Name, PersonEmail and EmailMessage are parameters passed via the url. Now locally everything worked fine. The function emailsend would return something. Note here my base URL was in my config file was empty.

I've now uploaded my code to a server and I'm looking to see if this url works:

mysubdomain.domainname.com/index.php/Welcome/emailsend/Name/PersonEmail/EmailMessage

I now get a 404 Error page not found. Where exactly am I going wrong?

You have to go to your codeIgniter config file and to change the site and the base URLs.

https://ellislab.com/codeigniter/user-guide/helpers/url_helper.html or you can go to application/config/config.php and changing them manually.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM