htaccess url rewrite

Posted by user761396 on Pro Webmasters See other posts from Pro Webmasters or by user761396
Published on 2011-05-21T13:49:14Z Indexed on 2011/11/18 18:04 UTC
Read the original article Hit count: 189

Filed under:
|

I used to have a rewrite rule to

RewriteRule ^([^/]+)\.htm$ index.php?c=$1 [NC]
RewriteRule ^([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC]

Now, i have to change to

RewriteRule ^1/([^/]+)\.htm$ index.php?c=$1 [NC]
RewriteRule ^1/([^/]+)\.htm/([0-9.]+)$ index.php?c=$1&amt=$2 [NC]
RewriteRule ^2/([^/]+)\.htm$ index2.php?c=$1 [NC]
RewriteRule ^2/([^/]+)\.htm/([0-9.]+)$ index2.php?c=$1&amt=$2 [NC]

(the difference is adding a subdirectory)

My question is how to redirect my old ones to the 1/ subdirectory?

thank you

© Pro Webmasters or respective owner

Related posts about htaccess

Related posts about rewrite