tensh |
|
---|---|
Hello; Let's assume I have a plugin flowcharts that has the structure: - mywebsite.com/index.php?e=flowcharts&uname=admin would look like mywebsite.com/flowcharts/admin (all flowcharts of admin) Any help in this area to produce custom nice urls for a plugin? And how about htaccess? When I finish, I will share the module with you :) |
Trustmaster |
|
---|---|
1. Create your custom datas/urltrans.dat based on plugins/urleditor/presets/handy.dat. Add these lines on top: flowcharts uname=*&fid=* {$e}/{$uname}/{$fid} flowcharts uname=* {$e}/{$uname} flowcharts fid=* {$e}/{$fid} 2. Add these rules to your .htaccess: RewriteRule ^flowcharts/([a-zA-Z][a-zA-Z0-9_-]*)/([0-9]+) index.php?e=flowcharts&uname=$1&fid=$2 [QSA,NC,NE,L] RewriteRule ^flowcharts/([0-9]+) index.php?e=flowcharts&fid=$1 [QSA,NC,NE,L] RewriteRule ^flowcharts/([a-zA-Z][a-zA-Z0-9_-]*) index.php?e=flowcharts&uname=$1 [QSA,NC,NE,L] May the Source be with you!
|
Macik |
|
---|---|
And don't foget `URL editor` plugin should be installed and setuped with `Custom urltrans.dat` preset. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
tensh |
|
---|---|
Thank you very much :) |