Apache Server .htaccess rewrite with wildcard -


is possible create rewrite code includes wildcard?

for example request for:

 http://example.com/something1/something2/* 

would redirect to:

 http://example.com/newthing 

and

will matter in .htaccess file place rewrites?

this should work you:

rewriteengine on rewriterule ^something1/something2/(.*)$ /$1 [r=302,l] 

it should change http://example.com/something1/something2/test http://example.com/test

edit:

rewriteengine on rewriterule ^shirts/(.*)$ /clothing.html [r=301,l] 

Comments

Popular posts from this blog

arrays - PHP Shopping Cart Variable and Object errors -

mysql - java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) -