htacess rewrite/redirect from domain to subdomain with itunes protocol

Posted on 2012-08-30
Last Modified: 2012-09-11

I have somehting very tricky, and im not sure how to accomplish it.. I have a website which has many rss feeds which download videos into itunes...I have now swicthed the rss feeds and videos to a subdomain, but i want all the old links to it to work....

old address

new address

I have about 40 of them that are similar up until the 'itpc://'

I suspect that I will need to have a redirect on the old domain and a rewrite on the new domain?
Question by:jblayney
    LVL 16

    Accepted Solution

    Within a .htaccess file on your "old" domain use:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule ^/?videos/rss/(.*)$$1  [L,NC]

    Open in new window

    LVL 1

    Author Comment

    Hi Graham

    just to be sure, the http on the second address should be itpc, or will that be a problem
    LVL 16

    Expert Comment

    Yes, Apache simply returns a "header" - so provided whatever is calling the URL can understand "itpc:" it will work.

    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule ^/?videos/rss/(.*)$  itpc://$1  [L,NC]

    Open in new window


    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now