繁体   English   中英

Codeigniter在网页上发送电子邮件错误404

[英]Codeigniter send email error 404 on web page

我正在测试一个网络示例...我在此方向上创建了联系表格,您可以尝试发送电子邮件,然后查看inspect-console或inspect-network:

http://www.novaderma.cl/site2/

它给出错误404,“在此服务器上找不到所请求的URL” ...我不知道发生了什么.... htacces文件,请帮助我!

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

在根目录的htaccess文件中添加此重写规则

<IfModule mod_rewrite.c>

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Rewrite all other URLs to index.php/URL
    RewriteRule ^(.*)$ index.php?url=$1 [PT,L] 

</IfModule>

同样在codeigniter的Config文件夹-> autoload.php文件中添加url助手:

$autoload['helper'] = array('url');

您必须在htaccess文件中的代码下方使用...

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase //
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

暂无
暂无

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

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