Keyword

How to change K2 SEF Url?

More
7 years 6 months ago #160778 by Adam
How to change K2 SEF Url? was created by Adam
As it has the com_k2 url pattern, the existing URLs look like :
website/index.php?option=com_k2&view=itemlist&task=user&id={a number}

After processing the joomsef, the url is :
website/index.php/component/k2/itemlist/user/{a number}

And I would like to change them to look like this :
{a number}.website/
or
{a number}.website/index.php/component/k2/

I tried to add a RewriteRule in .htaccess file
RewriteRule ^(.*)index.php/users/([a-zA-Z0-9_-]+)$ /website/index.php?option=com_k2&view=itemlist&task=user&id=$2 [L,QSA,R]

For example:
website/index.php/users/{a number}
to
website/index.php?option=com_k2&view=itemlist&task=user&id={a number}

but it just redirect to this page without replace

Could you please tell me how to do?
Thanks!!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #160798 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to change K2 SEF Url?
Hello,

In Joomla! it is best to use menu items instead of altering the htaccess file.
These URLs can be created by using menu items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum