Forum Moderators: phranque
Since there are thousands of subdirectories, I don't want to create a separate XML file or .htaccess file for each one.
How can I use the root web .htaccess to have every .xml file for each subdirectory point to [mydomain.com...] without using a redirect (I want search engine spiders to still "think" they're seeing [mydomain.com...]
I'm thinking of the "Alias" directive in .htaccess but not quite sure if this is what I need, or how to set it up.
Thanks
RewriteRule ^DIR([^.]+)rss.xml$ /rss_master.xml?rsspath=$1
All the subdirectories are under a common "DIR" directory above, so the regex works for me. Some slight adjustments may be needed to fit someone else's situation.
RewriteRule ^DIR(/[^/]+/)rss\.xml$ /rss_master.xml?rsspath=$1 [L]
RewriteRule ^DIR/([^/]+)/rss\.xml$ /rss_master.xml?rsspath=$1 [L]
Jim