Re: rewrite rules

Yes. Replace [0-9] there with [a-z]

Re: rewrite rules

changed it to
  '/^gallery_album[\/_-]?([A-Za-z0-9-]+).*(\.html?|\/)?$/i'  => 'index.php?gallery&album=$1'

but still get the Bad request hmm

Re: rewrite rules

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?

29 (edited by kierownik 2008-03-02 02:47)

Re: rewrite rules

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 roll

[edit] It seems that $_GET['album'] cannot be found hmm

30

Re: rewrite rules

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'

31 (edited by kierownik 2008-03-02 11:13)

Re: rewrite rules

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 sad

[edit] version that I now use you can download here http://kierownik.nl/download.php?actie=bekijk&id=13

32

Re: rewrite rules

I replaced:

'/^gallery[\/_-]album[\/_-]?(.*?)(\.html?|\/)?$/i'  => 'index.php?gallery&gallery=$1'

with:

'/^gallery[\/_-]album[\/_-]?(.*?)(\.html?|\/)?$/i'  => 'index.php?gallery=&album=$1'

and it works big_smile

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 wink

It explode url by "&":

$query_string = explode('&', $url_parts[1]);

(60 line of rewrite_rules.php)

Re: rewrite rules

Thanks daris, it works smile

the only thing that does not work is folder_based.php, he does not seem to do something with / but he does with - hmm

34 (edited by daris 2008-03-03 12:35)

Re: rewrite rules

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/'
);

Re: rewrite rules

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 smile