How to redirect the Temp URL

Avatar
  • Answered
Hello,

I'm trying to set up an automatic redirect from one URL in my personal site to another using cPanel. But I can't get it to work. I used the Redirects tool in the Domains menu (the icon of the globe with www in front) and set up a redirect with it (or so I thought). The redirect shows up inside cPanel. But it doesn't work when I test my site in a browser. Just to be sure, I cleared the cache before trying.

The redirection I want to do is this:
CURRENT SITE:
http://ecbiz103.inmotionhosting.com/~damian8/attachments/File/main31computer(1).swf

NEW REDIRECTED SITE:
http://ecbiz103.inmotionhosting.com/~damian8/page2.html

When I look in my .htaccess file, I see the following:
RewriteEngine on
# To set your custom php.ini, add the following line to this file:
# suphp_configpath /home/yourusername/path/to/php.ini
RewriteCond %{HTTP_HOST} ^damianpope\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.damianpope\.net$
RewriteRule ^attachments\/File\/main31computer\(1\)\.swf$ "http\:\/\/ecbiz103\.inmotionhosting\.com\/\~damian8\/page8\.html" [R=301,L]

One thing that confuses me is this:
My site is hosted by InMotion at the following URL:
http://ecbiz103.inmotionhosting.com/~damian8/

But I also have a custom domain name that automatically redirects to my Inmotion site:
http://www.damianpope.net

When I use the Redirects tool in cPanel, the *only* domain it allows me to redirect from is 'damianpope.net'. i.e. I can't redirect from:
http://ecbiz103.inmotionhosting.com/~damian8/

I don't know if this matters. Any help is appreciated.

Thanks!

Damian

P.S. I realize I'm trying to redirect from a swf file to a html page. But I want to embed the swf file in another page. I'm hoping this type of redirect is possible.

P.P.S. I also tried redirecting from one html page to another, but also couldn't get it to work.
Avatar
BradM
Hi Damian, Your Temporary URL, http://ecbiz103.inmotionhosting.com/~damian8/, is only to be used for testing purposes. Because of this, it isn't integrated into your cPanel at all, such as within the Redirect Manager. I manually edited your .htaccess file, and added the following code: Redirect 301 /~damian8/attachments/File/main31computer(1).swf http://ecbiz103.inmotionhosting.com/~damian8/page2.html The redirect seems to be working as you want. Please test however, and let me know if you see any issues. Thanks, - Brad