Clicky

Here is my situation....

We have change domain names.   We have build a new Corp web site.   I have set up the old site to "A redirection to a URL" and the client being sent to "The exact URL entered above" and "A permanent redirection for this resourse".

Now any URL with the old_domain.com will go to the Redirect to: New_domain.com
You can navigate to www.old_domain.com/folderA/mytest.html and it will redirect to the www.new_domain.com.

Here is my request.   I have a list of URLs that I woudl like to redirect to the respective page inthe new domain.   For example:

old_domain.com/prospect/entry.html  woudl redirect to newdomain.com/candidates/about.html

I still want any URL not cover inthe list of 301's to go to the new domain home page.

I have a list of about 20 some URL that need to redirected. Also, I have some image files that were refered to in other sites.  I do not want to redirect those URLS. Example old_domain.com.images/logo.gif

I have in this server ISAPI_rewrite and a ;htaccess.  I need a clear example of how this is written in the .htaccess file, and most important if it will work.

Many thanks.

asked 12/01/2011 05:27

fidoly's gravatar image

fidoly ♦♦


2 Answers:
When a browser requests a page or program on your Web site, the Web server locates the page identified by the URL and returns it to the browser. When you move a page on your Web site, you can't always correct all of the links that refer to the old URL of the page. To make sure that browsers can find the page at the new URL, you can instruct the Web server to redirect the browser to the new URL. You can redirect requests for files in one directory to a different directory, to a different Web site, or to another file in a different directory. When the browser requests the file at the original URL, the Web server instructs the browser to request the page by using the new URL.

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".

Procedures
To redirect requests to another Web site or directory


In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

Click the Home Directory, Virtual Directory, or Directory tab.

Under The content for this source should come from, click A redirection to a URL.

In the Redirect to box, type the URL of the destination directory or Web site. For example, to redirect all requests for files in the Catalog directory to the NewCatalog directory, type /NewCatalog.

To redirect all requests to a single file


In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

Click the Home Directory, Virtual Directory, or Directory tab.

Under The content for this source should come from, click A redirection to a URL.

In the Redirect to box, type the URL of the destination file.

Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.

You can use wildcards and redirect variables in the destination URL to precisely control how the original URL is translated into the destination URL.

You can also use the redirect method to redirect all requests for files in a particular directory to a program. Generally, you should pass any parameters from the original URL to the program, which you can do by using redirect variables.
To redirect requests to a program


In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

Click the Home Directory, Virtual Directory, or Directory tab.

Under The content for this source should come from, click A redirection to a URL.

In the Redirect to box, type the URL of the program, including any redirect variables needed to pass parameters to the program. For example, to redirect all requests for scripts in a Scripts directory to a logging program that records the requested URL and any parameters passed with the URL, type /Scripts/Logger.exe?URL=$V+PARAMS=$P. $V and $P are redirect variables.

Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.
link

answered

vinsvin's gravatar image

vinsvin

Not exatly what I was looking for, but stil a good alternative.

thank you.
link

answered 2011-12-01 at 18:19:11

fidoly's gravatar image

fidoly

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×1

Asked: 12/01/2011 05:27

Seen: 224 times

Last updated: 12/16/2011 02:55