Recent Topics

1 Aug 03, 2006 09:41    

So basically, I'm having a bit of trouble. I'm running two different blogs on b2. I want to link to both of them in the main navigation of my website.

On my website, I'm using php includes as shown below, in the area of my layout where I want my content to be:

                                                       <?php
									 switch( $_GET['id'] ) 
									 {
									 case 'news' : 
									 include 'news/blogs/index.php'; 
									 break;
									 
									  case 'bio' : 
									 include 'music/bio.html'; 
									 break; 
									 
									 
									 default:
									 include 'news/blogs/index.php';
									 break; 
									  
									 }
									 ?> 

In my navigation bar, then, I link to the different pages like this:

<a href="?id=news">News</a>

Fairly simple, right? Well, since the "news" blog is my default content page, when I first open the homepage, the news blog loads automatically. But when I try to navigate to it or my 2nd blog on the navigation bar, it says the following:
___

Forbidden

You don't have permission to access /news/blogs/skins/custom/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

___

Also, I noticed that the URL my browser has been pointed to is http://www.justplainsarah.com/news/blogs/skins/custom/?id=news, instead of what should be www.justplainsarah.com/news/blogs/index.php .

More background info: site is hosted with Dreamhost, b2 is installed under a justplainsarah.com/news , and I'm using b2 version Sparkle 0.9.2.

What am I doing wrong, and how can I fix it? I need both blogs to load within my main layout, but obviously I'm having trouble getting it work.

Any suggestions, tip, etc. would be beyond helpful.

Thanks,

~ PaperTigress

2 Aug 03, 2006 10:43

Part of your issue is due to the way b2evolution uses the "href" metatag. It is NOT your base URL! Instead it is the skin the visitor is using, which is why you're seeing a link to your skins/custom folder. What you want to do can be done. Sort of how including a link-back to [url=http://b2evolution.net]b2evolution[/url] can be done...

3 Aug 03, 2006 12:26

Well, that's good. . . at least it's something that can be fixed.

But I'm not quite sure what you mean. . . how do I make it work? I'll probably need it spelled it out :D I may be using PHP, but I still consider myself a beginner with anything besides HTML.

~PaperTigress

4 Aug 03, 2006 15:28

The problem is the meta base tag, which you insert into the site that displays the blog, through the skin.

So, you could either remove it - it's either "<base ...>" directly or through a function call (in the <head>...</head>) part.

The other solution would be to not just use "?id=news" in your navigation links, but a full URI, e.g. "/?id=news", then it does not get appended to the base URL.

5 Aug 04, 2006 11:16

Thanks so much! I deleted the base tage and it fixed it right up.

~Sarah W.


Form is loading...