4

You just need to implement your more specific redirect first, before your "generic" redirect everything else directive. For example: RewriteCond %{HTTP_HOST} example\.net$ [NC] RewriteRule ^en$ https://example.com/abc [L,R=301] RewriteCond %{HTTP_HOST} example\.net$ [NC] RewriteRule ^ https://example.com%{REQUEST_URI} [L,R=301] Aside... RewriteCond %{...


3

Try something like the following at the top of your .htaccess file to redirect the URL: RewriteEngine On RewriteRule ^feeds/\d+/comments/default /feeds/ [R=301,L] The pattern \d+ matches 1 or more digits. If the /comments/default part is not critical to make a match then it can be removed. If just matching a single digit is sufficient then change the regex ...


3

No, top-level domains (example.com) can be redirected independently with regards to their subdomains (www.example.com, notredirected.example.com). The typical setup for what you're describing is to redirect example.com and www.example.com to Domain B, but keep notredirected.example.com serving.


2

There is indeed another setting that controls redirects. To make Apache look at .htaccess, it is necessary to change the AllowOverrides line in the apache .conf file for the site: <Directory /var/www/oldsite/> Options FollowSymLinks AllowOverride **None** Require all granted </Directory> You can replace None by All to enable ...


1

It can be fine for SEO to redirect the base URL of the domain to a language based on the Accept-Language header. The only SEO concerns are: Test your rules for case in which the language header doesn't list one of the languages you support. Test your rules for no Accept-Language header sent at all. (Most bots won't send one). You need a fall-back page ...


Only top voted, non community-wiki answers of a minimum length are eligible