Mobile app version of vmapp.org
Login or Join
Murray155

: Mod Rewrite: HTACCESS How to rewrite a single URL to another? I have read through a ton of other similar questions and have tried too many combinations of code, but nothing works. I just need

@Murray155

Posted in: #Htaccess #ModRewrite

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:
example.com/all-categories/202/showCategory/54-Floor-Plans

and I want it to display as:
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!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray155

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bryan171

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. docs.joomla.org/Search_Engine_Friendly_URLs

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme