目前,我的joomla urls像http://www.website.com/index.php/gallery一样显示出来
代替http://www.website.com/gallery.php
所以我进入了全局配置部分...右手边有一个面板-我有搜索引擎友好的网址打开…
下面是使用URL重写的选项--警告说要使用这个功能,htaccess.txt必须重命名为.htaccess -所以目前它是关闭的--这个选项应该打开吗?如果是这样,问题是在我的服务器上已经有一个.htaccess文件
内容包括:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName prestige-car-valeting.com
AuthUserFile /home/prestig1/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/prestig1/public_html/_vti_pvt/service.grp然后是htaccess.txt文件,它包含了许多
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2012 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.
##所以很明显,当我尝试将htaccess.txt重命名为.htaccess时,弹出这样的文件已经存在……
有什么想法吗?
发布于 2012-08-10 19:28:58
只需复制htaccess.txt文件中的代码并将其添加到现有的.htaccess文件中。
这就是你真正需要做的。您的搜索引擎友好的URL将不会工作,除非在.htaccess中做了适当的条目。
发布于 2012-08-10 19:34:46
您使用哪个版本的Joomla?你将需要.htaccess来重写网址。所以它一定是开着的。你可以删除已有的文件并从你的网站目录中的Joomla复制一个新的.htaccess文件吗?但首先,您需要关闭该选项的->,然后复制新的.htaccess文件,然后打开该选项。
发布于 2015-05-06 05:08:40
Shyantanu是正确的,你只需要复制一个到另一个。
具体地说,我会将Joomla htaccess.txt文件的内容添加到已有.htaccess文件的内容之后。这是因为您现有的文件包含限制访问的指令,通常这应该在处理任何其他指令之前发生(如果您不应该访问URL,那么重写它就没有意义!)。
https://stackoverflow.com/questions/11900705
复制相似问题