• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 483
  • Last Modified:

htacess rewrite/redirect from domain to subdomain with itunes protocol

Hello,

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
itpc://www.website.com/videos/rss/my_rsss_feed.xml


new address
itpc://videos.website.com/rss/my_rsss_feed.xml

I have about 40 of them that are similar up until the 'itpc://www.website.com/videos/rss/'

I suspect that I will need to have a redirect on the old domain and a rewrite on the new domain?
0
jblayney
Asked:
jblayney
  • 2
1 Solution
 
grahamnonweilerCommented:
Within a .htaccess file on your "old" domain use:


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

Open in new window

0
 
jblayneyAuthor Commented:
Hi Graham

just to be sure, the http on the second address should be itpc, or will that be a problem
0
 
grahamnonweilerCommented:
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://videos.website.com/rss/$1  [L,NC]

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now