问题原文
原帖链接 · Bryan Earl · CC BY-SA 3.0
I have read through a ton of other similar questions and have tried too many combinations of code, but nothing works. I just need to add a single rewrite (not redirect) to my htaccess:
Here is the deal... I have this current URL:
https://example.com/all-categories/202/showCategory/54-Floor-Plans
and I want it to display as:
https://example.com/floor-plans
I still need it to actually be going to the original URL in the background to pull data, but display it differently in the browser URL.
Here is one of the options I tried (didn't work):
RewriteRule ^floor-plans$ all-categories/202/showCategory/54-Floor-Plans [L]
It is probably something extremely simple... HELP PLEASE!
已采纳解答
原帖链接 · Matthew Asia · CC BY-SA 3.0
I believe your problem is you're rewriting to a file that doesn't exist.
You'll need to find the non-rewritten URL.
For example:
RewriteRule ^floor-plans$ index.php?option=com_content&view=article&id=54
To find this you could try turning off Search Engine Friendly (SEF) URL's, open the page and check the URL.
You can also read more about SEF URL's here if you wish. https://docs.joomla.org/Search_Engine_Friendly_URLs
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
