Forum Moderators: phranque
But I've had no luck in getting mod rewrite to work in a subdirectory. I don't get any error message, it just seems to ignore the code I have in the <.htaccess> file. Here's an example of my code, which works fine when it's in the <.htaccess> in the root directory:
RewriteEngine on
RewriteRule ^subdir/filename(.*)$ [domain\.com...] [R=301,L]
Is there a way to get this to execute in an <.htaccess> file inside a subdirectory?
RewriteEngine on
RewriteRule ^[b]subdir[/b]/filename(.*)$ http://domain\.com/subdir/numbered/filename$1 [R=301,L]
So, I suspect the answer to your problem is to adjust the URL pattern for its local context, and use:
RewriteEngine on
RewriteRule ^filename(.*)$ http://domain\.com/subdir/numbered/filename$1 [R=301,L]
Jim
[edited by: jdMorgan at 6:06 pm (utc) on Jan. 1, 2005]