If you have simple URLs working and an .htaccess file.
With the pnamazon module as an example, if you name your module Amazon, have your rewrite rules as below, you would think it should bring the URL for the BOOKS ASIN regardless of what name you name it, if you give it a name with a hyphen, it will only when there is at least 1 letter in the asin, if all the asin is 100% numbers, you'll have the URL rewritten, but nothing will come up. I am using optimised postnuke .73.
The simple URL and rewrite code, everything works OK, except when it comes to books, only books with a mixture of letters and numbers or at least one letter and the rest numbers will work IF I HAVE A HYPHEN IN THE NAME, see below!
Here is an example:
Code
# asin url
RewriteRule ^blabla-([a-zA-Z0-9_]+).html$ modules.php?op=modload&name=Amazon&file=index2&asin=$1 [L]
RewriteRule ^blabla-([a-zA-Z0-9_]+).html$ modules.php?op=modload&name=Amazon&file=index2&asin=$1 [L]
Then have this line in the $INURL. in the replace_for_mod_rewrite:
Code
$prefix . 'modules.php\?op=modload&(amp;)?name=Amazon&(amp;)?file=index2&(amp;)?asin=([a-zA-Z0-9_]+)"|',
I tried ([^&]+), ([a-zA-Z0-9_]+), ([a-zA-Z0-9_+]+), ([a-zA-Z0-9-]) etc..
For your $OUTURL you have :
Code
'"blabla-.html"',
Basically, it'll work if YOU take the hyphen away, like this
htaccess: ^blabla([a-zA-Z0-9_]+).html$ modules.php?op=m....
$OUT: '"blabla$5.html"',
I need the hyphen in!
Interesting also, when using MDPro with short urls on, there is no problem. I'll keep hammering at it until I find the problem, I have the feeling the problem may not be a postnuke problem but the reference to alphanumeric characters or the order of the places in he URL....
