views:

51

answers:

1

I use something like that to pass to the parameter 'text' what follows after the domain

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?text=$1 [L,QSA]

So if I have www.example.com/tralala I get $text='tralala'

But I want it to be possible to have in the parameter the character ":" multiple times:

www.example.com/me:you:him

Can you give me a hand?

If I test

www.example.com/me:you:him 
I get the error:

Forbidden

You don't have permission to access /you:me:him on this server.
A: 
RewriteRule ^([a-z]+[\:a-z]+)$ index.php?text=$1 [L,QSA]

May require some tweeking. Although AFAIR the dot metacharacter matches any character except the dot itself, so you should be good with (.+) too.

Eimantas
The dot meta character matches any character, including the dot. And you don’t need to escape the `:`.
Gumbo