• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 479
  • 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

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

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