0

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:

http://rick.measham.id.au/paste/explain.pl?regex=^%28\w%2B%29%24

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

Edited by Dani: Fixed formatting

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by Cool&Awesome
0

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

Edited by pritaeas: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.