【问题标题】:.htaccess won't let me enter a subfolder.htaccess 不允许我输入子文件夹
【发布时间】:2013-11-14 16:46:09
【问题描述】:

我在主机中有 joomla,它运行良好。 但是我想为一个应用程序创建一个小型 Web 服务,所以我在我的根文件夹中创建了一个子文件夹,以便像这样访问:www.mydomain.com/myfolder

问题是,.htaccess 会自动将我重定向到 joomla 索引。我根本没有 .htaccess 配置的经验。我一直在阅读一些教程,但是每次我更改某些内容时,joomla 都会停止正常工作。 这是我的 htaccess 文件:

rewriterule ^component/users/(.*)$ index.php?option=com_comprofiler&task=login [L]
rewritecond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
rewritecond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
rewritecond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
rewritecond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
rewriterule .* index.php [F]
rewriterule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
rewritecond %{REQUEST_URI} !^/index\.php
rewritecond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule .* index.php [L]

创建子域不是一个选项(我只能访问 ftp)

谢谢

【问题讨论】:

    标签: .htaccess joomla


    【解决方案1】:

    rewritecond %{REQUEST_URI} !^/index\.php之后,添加:

    RewriteCond %{REQUEST_URI} !^/myfolder/
    

    这应该排除对/myfolder/ 的任何请求被路由到joomla 的index.php 文件。

    【讨论】:

      猜你喜欢
      • 2013-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多