Re: rewrite rules
Yes. Replace [0-9] there with [a-z]
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 troubleshooting → rewrite rules
Yes. Replace [0-9] there with [a-z]
changed it to
'/^gallery_album[\/_-]?([A-Za-z0-9-]+).*(\.html?|\/)?$/i' => 'index.php?gallery&album=$1'
but still get the Bad request
The link I'm now seeing is
http://pundemo.kierownik.nl/gallery-album-Lightbox.html
Do you see why that doesn't match the regex?
Yep now I see, changed it into:
'/^gallery[\/_-]album[\/_-]?([A-Za-z0-9-]+).*(\.html?|\/)?$/i' => 'index.php?gallery&album=$1'
but now going to http://pundemo.kierownik.nl/gallery-album-Lightbox.html will not show that album
phoe phoe, that sef url thing is more difficult than I thought
[edit] It seems that $_GET['album'] cannot be found
I installed your extension, changed some code and it works. Here is changed gallery.php file (between /***) and rewrite rule which i used:
/^gallery[\/_-]album[\/_-]?(.*?)(\.html?|\/)?$/i' => 'extensions/gallery/gallery.php?gallery=$1'
Thanks for trying daris, I also tried your code but I am now using index.php?gallery&album=$1
I tried to replace it in your code but I still do not get the album
[edit] version that I now use you can download here http://kierownik.nl/download.php?actie=bekijk&id=13
I replaced:
'/^gallery[\/_-]album[\/_-]?(.*?)(\.html?|\/)?$/i' => 'index.php?gallery&gallery=$1'
with:
'/^gallery[\/_-]album[\/_-]?(.*?)(\.html?|\/)?$/i' => 'index.php?gallery=&album=$1'
and it works
Simple method for check what is wrong:
echo '<pre>';
print_r($_GET);
echo '</pre>';
and it prints:
Array
(
[gallery] =>
[amp;album] => Lytebox
)
album is not set, amp;album is set
It explode url by "&":
$query_string = explode('&', $url_parts[1]);
(60 line of rewrite_rules.php)
Thanks daris, it works
the only thing that does not work is folder_based.php, he does not seem to do something with / but he does with -
rewrite_rules.php:
$pun_rewrite_rules_gallery = array(
'/^gallery(\.html?|\/)?$/i' => 'index.php?gallery=',
'/^gallery[\/_-]album[\/_-]?(.*?)(\.html?|\/)?$/i' => 'index.php?gallery=&album=$1'
);
Folder_based.php:
$pun_url_gallery = array(
'gallery' => 'gallery/',
'gallery_album' => 'gallery/album/$1/'
);
Changed it into:
rewrite_rules.php
'/^gallery(\.html?|\/)?$/i' => 'index.php?gallery',
'/^gallery[\/_-]album[\/_-]?(.*?|\/)(\.html?|\/)?$/i' => 'index.php?gallery=&album=$1'
Folder_based.php
'gallery' => 'gallery/',
'gallery_album' => 'gallery/album/$1/'
And I had to change manifest.xml because all the scripts and css used PUN_ROOT and then with folder_based they did not load, changed it into $base_url.
Thanks for all the help daris
PunBB Forums → PunBB 1.3 troubleshooting → rewrite rules
Powered by PunBB, supported by Informer Technologies, Inc.