Forum Moderators: phranque
i'm trying to rewrite an url like this:
[mysite.com...]
to something like this:
[mysite.com...]
this is my attempt but it doesn't work at all:
RewriteCond %{REQUEST_FILENAME} dir1/(.*?)/(.*?)/(.*?)$
RewriteRule ^dir1/(.*?)/(.*?)/(.*?) /dir1/$1/?start=$2&cp=$3
whats wrong?
if someone can tell me a better solution he is welcome
thanx all and excuse me for my bad english :-(
bye
Welcome to WebmasterWorld!
> whats wrong?
You are trying to use multiple instances of the ambiguous regular expressions pattern ".*" in an unanchored pattern, and this can cause problems. Try:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^dir1/([^/]+)/([0-9]+)/([0-9]+)$ /dir1/$1/?start=$2&cp=$3 [L]
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim