我在justhost.com帐户上遇到.htaccess文件的问题.我收到了持续的内部500错误,我在网上尝试了许多不同的解决方案.这是我的htaccess文件的样子:
ROOT HTACCESS
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
app/HTACCESS
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
app/webroot/HTACCESS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
问题是我在错误日志中得到了这个:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Run Code Online (Sandbox Code Playgroud)
我已经尝试将RewriteBase设置为/但它没有解决问题.
我想知道如何在没有被转义的情况下向cakephp网址添加"#".我试过'逃'=>假但没有成功.我这样做是为了尝试链接到包含注释的页面的id ="comments"部分.这是我的链接代码:
<?php echo $this->Html->link($post['Post']['total_comments'].' comments', array('controller' => 'posts', 'action' => 'view', $post['Post']['slug'].'#comments'),array('class' => 'comments-icon')); ?>
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激.