如何清理Joomla!网址? [英] How to clean up Joomla! URLs?
问题描述
我已经不停地在这里呆了几个月了.我开始寻找解决方案,但对于不断发现的不完整或过于复杂的答案,我很快感到沮丧.
I have been at this for a couple of months now, on and off. I start looking for the solution and i quickly get frustrated with the incomplete or overly complicated answers i keep finding.
我要做的就是将其转换为: mysite.com/component/content/article/17-category/61-article-name.html
All I want to do is to convert this: mysite.com/component/content/article/17-category/61-article-name.html
到此: mysite.com/category/article-name.html
Into this: mysite.com/category/article-name.html
必须有一种方法不会让我的大脑从头骨上掉下来.
There has to be a way that wont make my brain fall out of the skull.
我想从以前做过此事的人那里得到答案,您知道做这件事最简单的方法是什么?
I want an answer from those who have done this before, what is the simplest way you know of doing this?
推荐答案
您无需安装任何扩展程序即可.如果您使用的是Joomla 1.5,请转到站点->全局配置,然后打开右侧的3个选项:
You don't need to install any extension to do that. If you are using Joomla 1.5, go to Site -> Global Configuration and turn on the 3 options that you have on the right side :
搜索引擎友好的网址-是
Search Engine Friendly URLs - YES
使用Apache mod_rewrite-是
Use Apache mod_rewrite - YES
在URL中添加后缀-是
Add suffix to URLs - YES
然后将joomla文件夹中的htaccess.txt重命名为.htaccess
Then rename htaccess.txt that you have in your joomla folder to .htaccess
您应该在Apache服务器上安装mod_rewrite才能使其正常工作.
You should have mod_rewrite on your Apache server to get that working.
这篇关于如何清理Joomla!网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!