简体   繁体   English

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

[英]Codeigniter send email error 404 on web page

I'm testing a web example... I create a contact form on this direction, you can try to send an email and then view inspect-console or inspect-network: 我正在测试一个网络示例...我在此方向上创建了联系表格,您可以尝试发送电子邮件,然后查看inspect-console或inspect-network:

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

It gives an error 404, "the requested URL was not found on this server" ...I don't know what's happening...here is the .htacces file, please help me !! 它给出错误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>

In htaccess file in the root directory add this rewrite rule 在根目录的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>

Also in codeigniter Config folder -> autoload.php file add url helper: 同样在codeigniter的Config文件夹-> autoload.php文件中添加url助手:

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

You have to use below the code in your htaccess file... 您必须在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