简体   繁体   English

URL 模块在 localhost 上完美运行,但在 Web 服务器上不起作用

[英]URL module perfectly working on localhost, but not working on web server

The followingURL module is working以下URL模块正在工作

http://localhost/webnew/wms/directs/main.php?_modid=&_mod=&del=18

but can't run it on the server like this:但不能像这样在服务器上运行它:

http://......../wms/helpmes/main.php?_modid=&_mod=&status=0&no=1

why??为什么??

How can I run on the server normally like localhost?如何像 localhost 一样在服务器上正常运行?

I use code igniter.我使用代码点火器。

In your config file config/config.php please make sure you have set permitted_uri_chars like below.在您的配置文件中的config / config.php文件,请确保您已设置permitted_uri_chars像下面。 $config['permitted_uri_chars'] = 'az 0-9~%.:_\\-@\\=';

And also please make sure rewrite module is on in your server.并且请确保rewrite module在您的服务器上。 for apache server you have to do like below cammand.对于 apache 服务器,你必须像下面的命令那样做。

sudo a2enmod rewrite

sudo vi /etc/apache2/

sudo vi /etc/apache2/apache2.conf

In your apchae config file you have to write like this在你的 apchae 配置文件中,你必须这样写

<Directory /var/www/html/>

AllowOverride All

</Directory>

And then restart your server.然后重启你的服务器。

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

相关问题 URL完全适用于localhost,不适用于Web服务器 - URL perfectly working on localhost, not working on web server PHPExcel在已部署的服务器上生成带有扩展名错误的文件,但可以在localhost上正常运行 - PHPExcel generate a file with extension error on deployed server, but perfectly working on localhost php不在localhost上工作但在web服务器上工作? - php not working on localhost but on web server? 短信在本地主机上完美工作,但在线无法正常工作 - sms working perfectly on localhost but online it is not working PHP Bootstrap可以在localhost上完美运行,但不能在VPS上运行 - PHP Bootstrap working perfectly on localhost but not working on VPS 虽然在本地服务器中正常运行,但Codeigniter Web应用程序进入cpanel时出错 - Error in a codeigniter web app into cpanel though is working perfectly in a local server url重写可在localhost上使用,但不能在远程服务器上使用 - url rewrite working on localhost, but not on remote server URL重写在Server中不起作用,但在Localhost中起作用 - URL rewriting not working in Server but does in Localhost Codeigniter Session在本地主机上运行,​​但在Web服务器上不运行 - Codeigniter Session is working on localhost but not on web server cURL GET请求在localhost上有效,但在Web服务器上不可用 - cURL GET request working on localhost, but no on web server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM