Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have moved our website to wordpress but we do rely on several folders and we already have link and images pointing to the old locations.

for example:

http://domain.com/t/image_001.png

but I do not want to add all images again to the new web location, I would rather set a sub domain and keep them in the same place

How can I redirect

http://domain.com/t/*.* to http://t.domain.com/*.*?

something I need to do in php.ini file? or it's a website configuration?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

As it's an IIS Server (as the tag specifies) you have 2 options:

create the folder you want in the new site and add a web.config file with this content:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpRedirect enabled="true" destination="http://t.domain.com" />
    </system.webServer>
</configuration>

or, if you want to use the GUI

Select the folder, and open HTTP Redirect under "IIS"

enter image description here

and set the new domain

enter image description here

share|improve this answer
    
Blegh, I completely missed that :) –  adaptr Feb 10 '12 at 11:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.