Wordpress Category Domain Mapping Possible?

Using a single web hosting account to host multiple sites

Wordpress Category Domain Mapping Possible?

Postby eac18509 » Wed May 06, 2009 1:44 pm

Thanks for taking a moment to read my post. All help is greatly appreciated.

I am trying to figure out how to set up a single WP blog install where the categories can be viewed as individual domains by both users and search engines.


Is it possible to direct (map) to an individual blog category?

So for example domain1.com/category/cars can also be found at domain2.com/category/cars.

I have a reseller account with cpanel/whm.

My domains are registered with godaddy.
eac18509
 
Posts: 3
Joined: Wed May 06, 2009 12:48 pm

Postby richardk » Thu May 07, 2009 1:50 pm

You should be able to add the second domain as an add-on domain in cPanel.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby eac18509 » Thu May 07, 2009 2:03 pm

richardk wrote:You should be able to add the second domain as an add-on domain in cPanel.


If I set up an add-on domain, it will create a subdomain. Is it possible placing some code in the htaccess file (of the subdomain) to point to a select category on the main blog?

Also, keeping the url of the add-on domain.


Example:

mainblog.com/cars/this-is-a-test-post


addondomain.com/this-is-a-test-post


Thanks for the help.
eac18509
 
Posts: 3
Joined: Wed May 06, 2009 12:48 pm

Postby richardk » Thu May 07, 2009 2:15 pm

Try copying the Wordpress mod_rewrite to addondomain.com/.htaccess and creating an index.php file at addondomain.com/index.php with the following in it
Code: Select all
<?php include('../index.php');
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby eac18509 » Thu May 07, 2009 3:33 pm

richardk wrote:Try copying the Wordpress mod_rewrite to addondomain.com/.htaccess and creating an index.php file at addondomain.com/index.php with the following in it
Code: Select all
<?php include('../index.php');


I did as you stated and when I go to addondomain.com/index.php using

Code: Select all
<?php include('../index.php');


I receive the following errors.



Code: Select all
Warning: main(./wp-blog-header.php) [function.main]: failed to open stream: No such file or directory in /home/addmyurl/public_html/index.php on line 17

Warning: main(./wp-blog-header.php) [function.main]: failed to open stream: No such file or directory in /home/addmyurl/public_html/index.php on line 17

Warning: main(./wp-blog-header.php) [function.main]: failed to open stream: No such file or directory in /home/addmyurl/public_html/index.php on line 17

Fatal error: main() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/addmyurl/public_html/index.php on line 17




When I tried removing one of the periods, it shows only a blank screen.

Code: Select all
<?php include('./index.php');
eac18509
 
Posts: 3
Joined: Wed May 06, 2009 12:48 pm

Postby richardk » Fri May 08, 2009 6:11 am

The problem is mod_rewrite can't rewrite to a directory outside the current document root. And the main document root is outside the add-on domain's document root.

I think if you ask the people who know about cPanel/whm there will be an option to set the document roots to be the same.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 22 guests

cron