Redirect old domain urls to new one (except index.php and others) -


i have 2 domains: ok.com , ok.net ok.com home page 1 folder (ok.com/test) ok.net store products

i make ok.com primary page home page, , if type eg. ok.com/product-2 redirect ok.net/product-2

its working with

rewriteengine on rewriterule (.*)$ http://ok.net\/$1 [r=301,l] 

but redirects whole ok.com :(

this regular expression (.)$ matches uri string. if want rewrite pages, example, product- pages, should try (product.*)$. make sure regular expression match pages needed redirect.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -