Hi Everyone!:)

Searched net up'n down and also related threads but can't figure this one.

I have this:

RewriteRule ^(\w+)$ index.php?pageid=$1[icode] for the purpose of pretty urls.

Now, as long as pageid is a single word, everything's nice, but if there are dashes
(kinda-like-this) it simply doesn't work, that is, the ?pageid is not being sent to my php script.

Tried replacing (\w+) with (.*) - gives me very weird behavior and not working.

Thanks in advance.

PS. not to come empty handed to this cool forum, here's a nice thingy that will explain any regular expression you paste into it:


and even that didn't help me..nOOB..

\w matches a word character, which are letters, digits and underscores. I think you can replace it with ([\w\-]+)