- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 Joomla,它安装在站点根目录中,例如:
管理员/
...并且出于我的自定义目的,我需要有一个名为“mycustomdir”的目录,该目录需要在 Joomla 网站上“独立”,并且将启用对此目录的公共(public)访问,所以请问,我如何告诉 Joomla“不要”不关心这个目录及其内容”?
成分/
模块/
我的自定义目录/
...
示例:我需要访问 http://www.myjoomlasite/mycustomdir
我预计,它需要对 .htaccess 进行任何更改,不幸的是,我不太了解这个文件。我在 Joomla 中使用 SEF URL 重写,并且 Apache Web 服务器在安全模式下运行。有任何想法吗?感谢您的帮助!
这是我的 .htaccess 文件:
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##
##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
##
## Can be commented out if causes errors, see notes above.
##Options +FollowSymLinks
## Mod_rewrite in use.
RewriteEngine On
## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.
## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects
##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##
# RewriteBase /
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
最佳答案
尝试在自定义文件夹 mycustomdir 中添加 .htaccess
文件。 htaccess 文件应该只有
RewriteEngine On
在里面。这样您就不必编辑原始的 Joomla htaccess 文件
关于apache - 如何启用对 Joomla 站点根目录中我的自定义目录的直接访问?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28144346/
我正在使用 prestashop,在主题中我添加了自己的目录,里面有一个样式表 然后我在 header.tpl 中链接了样式表 例如 但是,如果我在子目录中安装 prestashop,例如 www.
我有以下目录结构: C:\mywebsites \site_1 \site_2 \site_n 在“site_2”中,我安装了 joomla,但是,我在“额外”文件夹之一中有其他文件夹,其
我有一个家庭作业,要求我使用 bash 脚本在 Linux 终端中打印某些内容。我已经完成了其中的大部分,但我被困在我需要做的最后一件事上......这就是我的教授的措辞 Checks to see
通过 Windows Batch,删除文件夹的所有子目录和子文件而不删除/删除所述父/根文件夹的命令是什么? 到目前为止,这是我尝试过的: ECHO "Good riddance, cache! Mu
我正在将 OpenCV 用于各种对象检测器,但我发现很难编写可移植代码。 例如,要在通过自制软件安装了 OpenCV 的 Mac 上加载人脸检测器,我必须这样写: haar=cv.Load('/usr
目录树的主要部分有root(/)、/USR、/var、/home等等。下面是一个典型的linux目录结构如下: / 根目录 /bin 存放必要的命令 /boot
我被这个非常愚蠢的错误所困扰。我正在尝试使用 bluepy 在 Raspberry Pi 上运行 pytest。 pi@pi:~/bluepy/bluepy $ pytest test_asdf.py
我在 Ubuntu 14 上安装了 MediaWiki,该站点的 URL 为:www.wiki.example.com/mediawiki/ 但是我想将位置更改为 www.wiki.example.c
我已经阅读了文档,但有些事情仍然让我感到困惑,主要与同步文件夹和数据库数据有关。 我想在我的主机上使用以下文件夹结构 ROOT |- workFolder ||- project1 |||- proj
我想在我的 Azure webrole 启动时授予网络服务帐户修改权限(根项目目录),有人知道这样做的方法吗?修改后,我会重置该值以确保安全。主要目的是我需要修改 webconfig 以根据多个节点上
我需要作为自定义构建器的一部分按顺序运行两个程序。 其中一个程序我被困住了,无法处理绝对/相对路径,因此我必须使用构建器的 chdir=1 选项才能运行其操作与目标位于同一目录中。 第二个是位于项目的
Cmake的安装命令 install(TARGETS MyTarget LIBRARY DESTINATION lib) 要求我将共享库安装到子文件夹中。似乎 LIBRARY DESTINATION
我正在尝试运行这个: string webRoot = "http://www.dev/api"; string apiRoot = "http://api.dev"; string path = "
在 android 中,我可以使用以下方法获取手机的可移动外部存储: for (File f : context.getExternalFilesDirs("/")) if (Environm
当我启动 tomcat 时,它从 localhost:8080/开始服务。我希望它从 localhost:8080/aaa 开始服务。我不想用“aaa”webapp 替换“root”webapp,我希
我想在按下按钮时向页面顶部的根 html 标记添加一个类。我遇到的唯一代码是将类添加到具有 id 的 div 元素。 Untitled Document 开始演示 我尝试修改这段代码,但没
我希望了解 ROOT 的 TTreeReader 和 TVector3 类的人可以帮助我。 我正在尝试使用 TTreeReader 读取包含 TVector3 的 TTree。 class MuseS
我已经从已经运行并安装在我本地的服务器上下载了 prestashop 文件选择了默认主题,但未应用任何样式表例如,当我通过 Firebug 检查时,样式表路径是错误的我有 http://localho
我有一个脚本,用于搜索包含特定文件的目录,从当前目录开始向上爬(想想试图找出 .git 目录所在的位置)。 我的方法是这样的: def getDir(self,cwd): path = os.pa
我需要 检查当前目录是否在Git版本控制下 如果是 Git 根目录 在单行 shell 脚本中执行上述操作,成功时应以 0 退出 最佳答案 使用 git-rev-parse 是可行的方法。只需确保将其
我是一名优秀的程序员,十分优秀!