How do I use wildcards to reference the same directory in my rule? I need blog_name to be the wild card, so the script checks if there is a file in the old_site directory and if it is, rewrites to it. Currently it works for one directory:
RewriteRule ^blog_name/([^/\.]+) old_site/blog_name/$1.php [NC,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
So I need blog_name to be ANY directory:
RewriteRule ^[*wildcard_dir*]/([^/\.]+) old_site/[*wildcard_dir*]/$1.php [NC,QSA]
Is this possible? Thanks in advance!
1 Answer