parked domains to folders

Using a single web hosting account to host multiple sites

parked domains to folders

Postby paullas » Tue Sep 08, 2009 6:41 am

hi

sorry if this has been asked before.

i have 5 domains parked on 1 hosting account(using cpanel)

main domain is:

maindomain.co.uk

parked domains are:

parkeddomain1.co.uk
parkeddomain2.co.uk
parkeddomain3.co.uk
parkeddomain4.co.uk
parkeddomain5.co.uk

i have installed wordpress on the maindomain.co.uk.

what im trying to do is because parkeddomain1.co.uk is parked on maindomain.co.uk it displays the contents off maindomain.co.uk,is there a way to use mod rewrite so when someone visits parkeddomain1.co.uk it forwards to the folder maindomain.co.uk/parkeddomain1

hope that makes sence and someone can help.

thanks

paul
paullas
 
Posts: 7
Joined: Tue Sep 08, 2009 6:28 am

Postby richardk » Tue Sep 08, 2009 7:50 am

FAQ: Add-on domain to sub directory.

For many domains
Code: Select all
Options +FollowSymLinks

RewriteEngine On

# Fix missing trailing slashes.
RewriteCond %{HTTP_HOST} ^(www\.)?(example\.com|example\.net|example\.org)$ [NC]
RewriteCond %{DOCUMENT_ROOT}/%2%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]

# Rewrite add-on domains.
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(www\.)?(example\.com|example\.net|example\.org)$ [NC]
RewriteRule ^(.*)$ /%2/$1 [QSA,L]

(example.com and www.example.com to /example.com)
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby paullas » Tue Sep 08, 2009 8:07 am

thanks for the quick reply. but that is for sub domains added in cpanel, i have use the parked feature and tried tha above but dosnt do anything.
paullas
 
Posts: 7
Joined: Tue Sep 08, 2009 6:28 am

Postby richardk » Tue Sep 08, 2009 8:15 am

but that is for sub domains added in cpanel

Why is it?

i have use the parked feature and tried tha above but dosnt do anything.

It could be a conflict with the Wordpress mod_rewrite. Post your whole .htaccess file.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby paullas » Tue Sep 08, 2009 8:18 am

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Options +FollowSymLinks

RewriteEngine On

# Fix missing trailing slashes.
RewriteCond %{HTTP_HOST} ^(www\.)?(jobswap\.co.uk)$ [NC]
RewriteCond %{DOCUMENT_ROOT}/%2%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]

# Rewrite add-on domains.
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(www\.)?(jobswap\.co.uk)$ [NC]
RewriteRule ^(.*)$ /%2/$1 [QSA,L]
paullas
 
Posts: 7
Joined: Tue Sep 08, 2009 6:28 am

Postby paullas » Tue Sep 08, 2009 8:59 am

i think the problem is im trying to re direct to a wordpress post and not an actually folder.

as if you type jobswap.co.uk/jobswap you see the post but if i put this in the htacess it cannot find it.
paullas
 
Posts: 7
Joined: Tue Sep 08, 2009 6:28 am

Postby richardk » Tue Sep 08, 2009 4:19 pm

Is there an unfriendly URL you can use to access the page instead? /index.php?page_id=ID?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby paullas » Fri Sep 11, 2009 1:40 pm

richardk wrote:Is there an unfriendly URL you can use to access the page instead? /index.php?page_id=ID?


sorry for delay

ill try that now
paullas
 
Posts: 7
Joined: Tue Sep 08, 2009 6:28 am

Postby paullas » Fri Sep 11, 2009 1:48 pm

if i turn the permlinks off it shows

domain.co.uk/?p=106

so maybe i should use that method
paullas
 
Posts: 7
Joined: Tue Sep 08, 2009 6:28 am

Postby paullas » Fri Sep 11, 2009 1:52 pm

ok so how to i make it so when someone lands on

http://www.jobswap.co.uk/

it shows the page

http://www.jobswap.co.uk/?p=108

any help much very appreciated
paullas
 
Posts: 7
Joined: Tue Sep 08, 2009 6:28 am

Next

Return to Domain Handling

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron