我一直在尝试配置我的.htaccess文件以获得以下结果:
当使用正斜杠“/”my index传递参数(在本例中为电子邮件)时.php文件将获得此参数。但我认为有些不对劲。
调用方法的正确方法:http://localhost.com/method/info@email.com
没有.htaccess的方式:http://localhost.com/method/index.php?email=info@email.com
但即使当我配置.htaccess时:
<ifmodule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)/?$ index.php?email=$1 [QSA,L] </ifmodule>
出现以下错误:
未找到 在此服务器上找不到请求的 URL 本地主机/方法/info@email.com。
此外,在尝试使用 ErrorDocument 处理请求时遇到 404 未找到错误。
我是否在 .htaccess 文件中遗漏了某些内容?
提前致谢。
慕斯王