问题
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.
All I want to do is to convert this: mysite.com/component/content/article/17-category/61-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?
回答1:
You can use a SEF component for Joomla like sh404SEF or aceSEF or JoomSEF. Personally I like aceSEF however they have a footer watermark on each page. You can pay for the version that doesn't.
These will generate SEF urls for you, however if you still don't like them you can go into the component and set the urls for each link manually.
回答2:
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
Use Apache mod_rewrite - YES
Add suffix to URLs - YES
Then rename htaccess.txt that you have in your joomla folder to .htaccess
You should have mod_rewrite on your Apache server to get that working.
来源:https://stackoverflow.com/questions/4104469/how-to-clean-up-joomla-urls