I'm completely new to the community and have a question which might seem stupid.
I've created a page in my Wordpress site (which is not finished yet) which I want to use as a landing page. However, I want this page to be seen as a subdomain of my website.
The website is event-lab.ro and the subdomain should be webdesign.event-lab.ro (which actually points to event-lab.ro/webdesign).
Now, what I want is to rewrite the Wordpress name as the subdomain, so that whenever someone goes to the link or someone inserts webdesign.event-lab.ro in the address bar, the name in the address bar stays webdesign.event-lab.ro.
I'm new to .htaccess, but I've combed the Internet and tried variations of code, with no luck.
Here's what I did:
1) I created a new folder named "webdesign" in my "public_html" folder (that being where my website is stored).
2) I created an .htaccess file in said folder with the following code...
RewriteEngine on
RewriteCond %{HTTP_HOST} ^webdesign\.event\-lab\.ro$ [OR]
RewriteCond %{HTTP_HOST} ^www\.webdesign\.event\-lab\.ro$
RewriteRule ^(.*)$ "http\:\/\/event\-lab\.ro\/webdesign" [R=301,L]
3) And I also created an index.php file in the same folder, that simply load the Wordpress theme, environment and Template...
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
$_GET['page_id']=25140;
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('../wp-blog-header.php');
4) I should point out that I'm using a childtheme.
I've tried all sorts of variations of the .htaccess code, but nothing works. Whenever I try to go to webdesign.event-lab.ro I'm simply redirected to event-lab.ro/webdesign.
Any ideas?
UPDATE: Ok, so after some more checks, my hosting company confirmed that mod_proxy is activated. However, the redirect still doesn't work right. If I use the proxy flag, the page doesn't display at all. It just keeps loading until it times out.
My current code in the .htaccess file is:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^webdesign\.event\-lab\.ro$ [OR]
RewriteCond %{HTTP_HOST} ^www\.webdesign\.event\-lab\.ro$
RewriteRule ^ http://event-lab.ro/webdesign [P]