apache - htaccess RewriteRule for folder -


i have bunch of rewrite rules implement. redirect has /blog/tag/... root url.

for example, of these:

 blog/tag/button-sets/ blog/tag/icons/ blog/tag/order-now/ blog/tag/body-attributes/ 

would route to: www.url.com

i can on case-by-case basis below, redirect bunch 1 rule. appreciated

rewritecond %{http_host} ^url\.com$ [or] rewritecond %{http_host} ^www\.url\.com$ rewriterule ^blog\/tag\/button\-sets\/?(.*)$ "http\:\/\/www\.url\.com\/$1" [r=301,l] 

why dont remove button-sets part of rule so

rewriterule ^blog\/tag\/?(.*)$ "http\:\/\/www\.url\.com\/" [r=301,l] 

havent tested should ok?


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -