Hakim
Hakim

Reputation: 3437

Joomla - Cant add a rewrite rule when joomla SEF plugin is on

I have this rewrite rule in my .htaccess file:

RewriteRule ^home\/([a-z]+)\/([0-9]+)$ /?filter=$1&start=$2 [L]

Although this rule is correct, the only way to make it work (i.e: not show a 404 error), is by disabling SEF plugin.

My question is: Is there a way to add some rewrite rules, when SEF plugin is activated (because I need it)?

P.S: These url params are used to filter data shown on a k2 module (mod_k2_content).

Upvotes: 0

Views: 274

Answers (1)

Laoneo
Laoneo

Reputation: 1566

K2 supports Joomla routing as they have a router. To understand how routing in general works check out the documentation here http://docs.joomla.org/Supporting_SEF_URLs_in_your_component. You have to figure out how the url is built as K2 needs them in special order to make the lookup correctly. BUT routing does only work for components, you are talking about a module, don't know if it will work then too.

[UPDATE: As it looks like that the module is custom and relies on _GET variables]

Then you have make your own System plugin to modify the router. Documentation can be found here: http://docs.joomla.org/J2.5:Creating_a_System_Plugin_to_augment_JRouter

Upvotes: 1

Related Questions