Simple forwarding an addon domain

Using a single web hosting account to host multiple sites

Simple forwarding an addon domain

Postby Aqua » Mon Mar 23, 2009 5:29 pm

Hi there, new to this, just a couple questions.

I have a main site

www.mysite.com/folder1

and an add-on domain forwarding to

www.mysite2.com/folder1


Q1) How can I get the add-on domain to forward to this PHP page (
www.mysite2.com/folder1/folder2/mainpage.php) without an endless redirect loop?

Q2) Right now I have the URLs forwarding to separate folders.. is there a way I can make the sub-folders "disappear".. right now when you type www.mysite.com it will just forward you to www.mysite.com/folder1. Can I have the URL be the domain only and not show the folder?

Thank you.
Aqua
 
Posts: 2
Joined: Mon Mar 23, 2009 5:22 pm

Postby Aqua » Tue Mar 24, 2009 1:14 am

Well thanks to this forum I managed to figure it out.

I have an addon domain and configured the server so the domains root was www.example.com/folder1

I wanted this to redirect to www.example.com/folder2/php_file.php

So I found a thread and worked this out, put this in the /folder1/ root


Code: Select all
Options +FollowSymLinks

RewriteEngine On

# Forward to php.
RewriteRule ^$ /folder2/php_file.php [R=302,L]


Seems to have worked perfectly.
Thanks for this forum helped a lot.
Aqua
 
Posts: 2
Joined: Mon Mar 23, 2009 5:22 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 1 guest

cron