I've things i thought will be a simple question however i suppose I am missing something.

I've got a website with two domains connected by using it. What Let me do is modify my .htaccess file to ensure that anybody attempting to access a specific folder is rerouted towards the correct domain title.

For instance:

Someone being able to access world wide web.domain.com/folder/ ought to be rerouted to world wide web.website.com/folder/, only for your folder.

An amount I must use in the .htaccess file to get this done?

Any assistance will be appreciated!

RewriteCond will have the desired effect. NOTE: I did not test this verbatim, therefore it is psuedocodish.

RewriteCond $ domain.com [OR]

RewriteCond $ world wide web.domain.com

RewriteRule ^folder/(.*)$ http://world wide web.website.com/folder/$1 [QSA,R=301,L]

Make certain you look into the paperwork at http://httpd.apache.org/paperwork/2.2/mod/mod_rewrite.html particularly flags like [QSA] meaning to append the query string.

Note the R=301 flag, that will tell the customer that this can be a permanent redirect. You will find a number of other flags you should use...

Inside your world wide web.domain.com .htaccess add this:

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^folder(.*)?$ http://world wide web.website.com/folder$1 [R]