How to redirect the Temp URL

Category: Cpanel

Damian2
Asked:
2012-10-02 2:16 pm EST

Hits: 959
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.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User

0

BradM
Staff
5,399 Points
2012-10-02 2:34 pm EST
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

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!