What regular expression need to use for rewriting url having in input something as:
http://domain.ext/mydir/subdir/page.php
and in output something as:
http://domain.ext/mydir-subdir-page.php
The "mydir" is a constant. "subdir" and "page" are variables. I have tried with:
<IfModule mod_rewrite.c>
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteRule ^([a-z0-9]+)/mydir/([a-z0-9]+)/([a-z0-9]+)/?$ /mydir/$1-$2.php [QSA,L]
</IfModule>
but don't work. Thanks.