我有点迷茫了。我正努力达到“训练有素的猴子”的知识水平,所以请简单回答,不要以为我什么都知道。:-)
环境:Ubuntu 17.1、Apache2、PHP 7.0。
我有两个 Joomla 网站使用 sh404SEF 扩展将 Joomla URL(如“index.php?option=com_content&Itemid=101&catid=15&id=54&lang=en&view=article”)重定向到“/blog/article-name”。
它们在我的主机上运行良好,但在我尝试离线修改的个人服务器上却不行。
我已经尝试了这里和其他网站上能找到的所有方法。我进入了 etc/apache2/sites-available/000-default.conf 并修改了代码:
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All (I also tried the suggested AllowOverride FileInfo)
Order allow,deny
allow from all
</Directory>
我的(精简版).htaccess 文件是:
########## Begin - No directory listings
## Note: +FollowSymlinks may cause problems and you might have to remove it
IndexIgnore *
# Options +FollowSymLinks All -Indexes
########## End - No directory listings## No directory listings
########## Begin - File execution order, by Komra.de
DirectoryIndex index.php index.html
########## End - File execution order
########## Begin - Activate RewriteBase
RewriteBase /
########## End - Activate RewriteBase
## Mod_rewrite in use.
RewriteEngine On
## 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.
我的问题是:我做错了什么,我该如何解决?