Welcome to WebmasterWorld Guest from 22.214.171.124
RewriteRule (.*) [domain1.com...] [R=301,L]
So - any idea what I need to change in my htaccess file so only requests for domain1 will redirect, and not requests for domain2?
To avoid your current problem, simply change the RewriteCond pattern to a positive match for the domain that you *do* wish to redirect, making it "^domain1\.com" instead of "!^www\.domain1\.com".
See the mod_rewrite and regular expressions documentation cited in our forum charter.
i have a question about htaccess file
i'm using Pmachine CMS, on which u can view the same article using different files
i did 4 months ago modrewrite and now my files have this look
503 (is article number)
3 (weblog number)
avoiding duplicate content, now i need to redirect all users who come with stuff/***_0_*_0_M/ to more/***_0_*_0_M/
need advice how to do it?
i try such a code, but it seems don't work
RewriteRule /stuff/([A-Za-z0-9_]+)/ /more/$1/ [R=301]
what i'm doing wrong.
In .htaccess, you'll need:
RewriteRule ^stuff/([A-Za-z0-9_]+)/$ /more/$1/ [R=301,L]
i know that 301 redirect is allowed by google, but is it so bad, when ur htaccess file is more than 10kb file?
(i put a lot of redirects, modrewrite) and afraid, that it may cause any problem .. (for example speed will be slow and something more serious)
You might be able to combine several or many of your rewrites and redirects into just a few by making better use of mod_rewrite's regular-expressions-based pattern-matching and back-referencing capability.