我需要帮助编辑我的 httpd.conf 文件以在 CWP 控制面板上安装后运行我的脚本。我的脚本使用默认设置在 cpanel 上运行。 .htaccess 文件详细信息:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Apache config
<FilesMatch ".(eot|ttf|otf|woff|php)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
最佳答案
尝试删除 Apache config
行,以便您的 .htaccess 文件如下所示:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
<FilesMatch ".(eot|ttf|otf|woff|php)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
使用htaccesscheck.com检查您的 .htaccess 文件语法。
关于php - 目前无法处理此请求 htaccess,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52596281/