adipalmer123 Posted March 13, 2012 Share Posted March 13, 2012 Hi all Just to let you know where I am up to currently. I have created a database for articles I want to display a a blog. I have created a blog.php page and am echoing out parts of the database. I have then created some dynamic links to display the full article on another page i've named newsarticle.php. My whole site uses includes. i.e. www.maplewebdesign.co.uk/index.php?page=home etc. I've created a sum domain - blog.maplewebdesign.co.uk but I want to re-direct this to my blog page which is www.maplewebdesign.co.uk/index.php?page=blog I hope this makes sense. I would really appriciate some help. My website is www.maplewebdesign.co.uk by the way. The blog page isn't linked yet, but the link is, www.maplewebdesign.co.uk/index.php?page=blog Thanks Adi Quote Link to comment https://forums.phpfreaks.com/topic/258820-php-includes-re-directing-to-blogmycomapnycouk-help/ Share on other sites More sharing options...
scootstah Posted March 13, 2012 Share Posted March 13, 2012 I hope this makes sense. Not really. Post code please. Quote Link to comment https://forums.phpfreaks.com/topic/258820-php-includes-re-directing-to-blogmycomapnycouk-help/#findComment-1326776 Share on other sites More sharing options...
Muddy_Funster Posted March 13, 2012 Share Posted March 13, 2012 in your index.php page for your subdomain put the following code: <?php header('Location: www.maplewebdesign.co.uk/index.php?page=blog'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/258820-php-includes-re-directing-to-blogmycomapnycouk-help/#findComment-1326777 Share on other sites More sharing options...
scootstah Posted March 13, 2012 Share Posted March 13, 2012 Ah, now I see. The coffee helped. I assume you would want to redirect traffic to the relevant blog article, rather than just the main site? Like, blog.maplewebdesign.co.uk/some-article redirects to maplewebdesign.co.uk/index.php?page=blog&article=some-article, or something. If yes your best bet is probably some .htaccess rewrites. Quote Link to comment https://forums.phpfreaks.com/topic/258820-php-includes-re-directing-to-blogmycomapnycouk-help/#findComment-1326787 Share on other sites More sharing options...
Muddy_Funster Posted March 13, 2012 Share Posted March 13, 2012 Ah, now I see. The coffee helped. ... Always! Quote Link to comment https://forums.phpfreaks.com/topic/258820-php-includes-re-directing-to-blogmycomapnycouk-help/#findComment-1326793 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.