By continuing your navigation on this site, you accept the use of cookies to offer you contents and adapted services. Legal Notice.

GuppY Help Center, help online, documentation and tutorials



You are here :   Welcome » Plugins url-rewriting
    Print this page...
    Print this section...

Plugins url-rewriting

Address rewriting is taken into account in GuppY 5.0.

It is implemented this way:

In the data/config/rules folder, a file containing the rules is placed in the data/config/rules folder, it will be loaded at the same time as the GuppY rules.

the rules are written like this:

RewriteRule ^plugins/mon_plugin/([a-z]{2})-(mon_sigle-1)$ plugins/mon_plugin/mon_script.php?lng=$1 [L]

For example, if you want to place a button in the menu, in plugins/my_plugin/plugin. inc you declare the address as follows:

$plugin_bar_url = $site['URLR'] == 'on' ? 'plugins/mon_plugin/'.$lng.'-mon_sigle-1' : 'mon_script.php?lng='.$lng;

We add as many rules as necessary following this principle.

Creation date : 02/03/2015 @ 16:39
Category : Documentation - Plugins tutorial
Page read 11117 times