Domain .htaccess redirect issue?

Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / # folder rewrite RewriteRule ^somefolder$ folder L # domain redirect RewriteCond %{HTTP_HOST} =domain. Com OR RewriteCond %{HTTP_HOST} =domain. Se RewriteRule (.*) http://www.domain.com/$1 R=301,L This is to be placed in htaccess file in website root folder.

If placed elsewhere some tweaking may be required First rule will rewrite (internal redirect) requests to somefolder to folder If you need this to be 301 Permanent Redirect, then replace L by R=301,L Second rule will do domain redirect job. This rule will ONLY redirect if domain is domain. Com or domain.Se If you want to have redirect from ANY domain name (that your webserver is configured can serve) to www.domain.com then replace those 2 RewriteCond lines with this one: RewriteCond %{HTTP_HOST}!

=www.domain.com.

Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / # folder rewrite RewriteRule ^somefolder$ folder L # domain redirect RewriteCond %{HTTP_HOST} =domain. Com OR RewriteCond %{HTTP_HOST} =domain. Se RewriteRule (.*) http://www.domain.com/$1 R=301,L This is to be placed in .

Htaccess file in website root folder. If placed elsewhere some tweaking may be required. First rule will rewrite (internal redirect) requests to /somefolder to /folder.

If you need this to be 301 Permanent Redirect, then replace L by R=301,L Second rule will do domain redirect job. This rule will ONLY redirect if domain is domain. Com or domain.se.

If you want to have redirect from ANY domain name (that your webserver is configured can serve) to www.domain.com then replace those 2 RewriteCond lines with this one: RewriteCond %{HTTP_HOST}! =www.domain.com.

Thank you, this worked perfectly! – Jonathan Jul 21 at 10:03 @Jonathan Glad to hear. In this case please consider marking this answer as accepted – LazyOne Jul 21 at 10:12.

RewriteCond %{HTTP_HOST}! ^domain.com$" rel="nofollow">domain.com$ RewriteRule ^(.*)$ domain.com/$1" rel="nofollow">domain.com/$1 R=301 That should meet all of your requirements. All requests that are not domain.com will be redirected to that domain, with the request URI intact.

I used the answer in the post below, but thank you! – Jonathan Jul 21 at 10:04 Is there a reason you say you used the other code that was posted 27 minutes later but is the same, aside from being overly verbose? – Dan Grossman Jul 21 at 10:14.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions