简体   繁体   English

joomla网站中的URL重写

[英]URL Rewriting in joomla site

I have enabled SEF in the site configuration and my urls are human readable. 我已经在站点配置中启用了SEF,并且我的网址是可读的。 I have a menu structure as below Channel -> Main channel items -> sub channels 我具有如下菜单结构频道->主频道项目->子频道

for eg I have a menu Channel -> recipes -> poultry 例如,我有一个菜单频道->食谱->家禽

In the poultry i have got many recipes for eg grilled-chicken-with-cream-sauce when i am opening this item (its a k2 item) i am getting below mentioned url http://www.kayftv.com/poultry/grilled-chicken-with-cream-sauce 在家禽中,当我打开此项目(它是k2项)时,我有很多食谱,例如烤鸡配奶油汁,我在下面提到的网址是http://www.kayftv.com/poultry/grilled奶油鸡

What i want is i wanted to add recipes in the url just like below 我想要的是我想在URL中添加配方 ,如下所示

http://www.kayftv.com/recipes/poultry/grilled-chicken-with-cream-sauce http://www.kayftv.com/recipes/poultry/grilled-chicken-with-cream-sauce

Can you please suggest how would i achieve this 你能建议我如何做到这一点吗

I am using joomla 2.5 我正在使用joomla 2.5

Many Thanks 非常感谢

One answer is sub-menus. 答案之一是子菜单。 So you would have a top level menu item of Recipes with alias recipes, add sub-menu item of Poultry with alias of poultry which displays the article in question. 因此,您将拥有带有别名配方的“食谱”的顶级菜单项,添加带有“家禽”别名的“家禽”子菜单项,该子菜单项将显示相关文章。 This will generate the SEF url you are looking for. 这将生成您要查找的SEF网址。

The method suggested by Brian can work well, and I've used it many times mysel. 布赖恩(Brian)建议的方法可以很好地工作,我已经多次使用了mysel。

One downside though is if you have a lot of articles, it will require plenty of leg work to get a clean URL without a prepended article id in the address. 一个缺点是,如果您有很多文章,则需要大量工作才能获得干净的URL,而地址中没有前缀的文章ID。

Another option is to use aa SEF extension. 另一种选择是使用SEF扩展名。 sh404SEF is one very good choice and there are others. sh404SEF是一个非常好的选择,还有其他选择。

With sh404SEF, the general solution to your question would be to create recipies and poultry categories, configure sf404SEF and set it to manage your SEO. 使用sh404SEF,解决您问题的一般方法是创建接收方家禽类别,配置sf404SEF并将其设置为管理您的SEO。

I think the larger your site is, the more you want to look towards using a SEF extension. 我认为您的网站越大,您希望使用SEF扩展的范围就越大。 They can save you a lot of time, and make it much easier to make bulk, site wide changes. 它们可以为您节省大量时间,并使在站点范围内进行批量更改变得容易得多。

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM