Warning: Undefined array key "HTTP_ACCEPT_ENCODING" in /home/freeguppyorg/sites/ghc.freeguppy.org/inc/hpage.inc on line 45
GuppY Help Center - Plugins url-rewriting

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 : - Plugins tutorial
Page read 16786 times