简体   繁体   English

Codeigniter URL在本地工作,但不在服务器上

[英]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. 其中Name,PersonEmail和EmailMessage是通过url传递的参数。 Now locally everything worked fine. 现在,本地一切正常。 The function emailsend would return something. 该功能emailsend将返回一些信息。 Note here my base URL was in my config file was empty. 注意这里我的基本URL在我的配置文件中是空的。

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. 我现在找不到404错误页面。 Where exactly am I going wrong? 我到底哪里出问题了?

You have to go to your codeIgniter config file and to change the site and the base URLs. 您必须转到您的codeIgniter配置文件,并更改站点和基本URL。

https://ellislab.com/codeigniter/user-guide/helpers/url_helper.html or you can go to application/config/config.php and changing them manually. https://ellislab.com/codeigniter/user-guide/helpers/url_helper.html,或者您可以转到application / config / config.php并手动更改它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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