1 eblog Aug 14, 2004 00:41
3 isaac Aug 16, 2004 23:05
Just to clarify,
1. Create a stub file called "yellowdog.php"
2. http://forums.b2evolution.net/viewtopic.php?t=1564
3. Set the blog to "other blog through stub file" in the blogs tab.
4. Set the stub file to "yellowdog" in the blogs tab.
URL:
http://domain.com/yellowdog/2004/08/16/url_title
The stub is there, but it's cleaned up. We removed index.php.
4 eblog Aug 17, 2004 01:24
Well thanks, in fact I I'm ok with having index.php in the URL.
I was having :
domain.com/yellowdog/index.php/yellowdog/
because my Preferred access type was set to index.php
However I'm not comfortable with adding an .htaccess file with complex rules in every folders.
And I would like to keep
domain.com/yellowdog/index.php/
rather than
domain.com/yellowdog/stubname.php/
Now the problem is that I can't have 2 identical stubnames :
This URL blog name / Stub name is already in use by another blog. Choose another name.
So I would prefer to bypass this with an active method (rather than passive) such as a Core hack.
I just tried that in admin/b2blogs.php :
{ // Stub name is already in use
echo 'Warning : This stub name already exists.';
//errors_add( T_('This URL blog name / Stub name is already in use by another blog. Choose another name.') );
}
And had that error : MySQL error!
Duplicate entry 'index.php' for key 2(Errno=1062)
Any more safe way ?
5 user_925 Aug 17, 2004 05:39
Check out: http://forums.b2evolution.net/viewtopic.php?t=1981
The best way that I've found is to drop the unique index off of the stub_file column in the database. If you don't want to hack the core to not check the stub name, you'd have to add the data into the table itself. Though, if you need to change anything on the page again, you'd have to change the stub name to save the page and go back and modify it in the database. Something like phpMyAdmin makes it all real easy if you have the ability to manage your server.
6 eblog Aug 19, 2004 18:49
Well I only dropped the index and it works.
Excellent method, thanks.
7 isaac Aug 20, 2004 17:31
Actually, you don't need to put anything in every folder.
Just put FP's version of the .htaccess file in your root WWW folder, and it'll affect all of them.
Dropping the unique on the stub file will open up the door for bugs if you try to access your blogs via index.php/stub_name. That key is there for a reason.
I fail to see how many folders and a database field that is rendered useless is easier to manage than simply having a bunch of stub files. And, using your method, your URLs are not as clean as they are with mine. What's the benefit? Just that you don't have to use a .htaccess file? It's one file, that you set up once and forget about forever, what's hard with that?
8 eblog Aug 20, 2004 17:47
isaac wrote:
Actually, you don't need to put anything in every folder.
Yes I have understood that and mentioned it in the first post.
But b2E is not the only blogware to run on my server.
I wanted them all to be installed in a single directory, and all there blogs to be in a folder (for each) and these folders at root.
(I have excluded the idea of subdomains)
Plus I store several other files in these folders, such as variables, diferent for each blogs.
isaac wrote:
... if you try to access your blogs via index.php/stub_name.
That will never happen, index.php is stub_name
or the contrary if you prefer : stub_name is index.php
9 gman Sep 07, 2004 21:38
Isaac,
Are you saying it is possible to have a stub file outside the b2evo directory? :?:
B2EVO installed at:
domain.com/blogwares/b2evolution/
stub file called yellowdog.php is located at:
domain.com/yellowdog/yellowdog.php
Permalinks look like this:
http://domain.com/yellowdog/2004/08/16/url_title
--------------------------------------------------
I have a similar set up where B2EVO is installed at:
domain.com/apps/b2evo/
I need to access my blog through:
Blog A - www.domain.com/
Blog B - www.domain.com/blogb
Blog C - www.domain.com/blogc
How do I setup my stubs files for this setup to work? Where do I put the stub files at? in each directory listed above? What do I set for each blog setting? Will I still be able to have the clean permalinks?
10 isaac Sep 07, 2004 22:09
gman,
Why put b2evo in a separate directory?
Check out [url=http://isaacschlueter.com/]my blogs[/url] for an example of this method in use. (I also strip the date out of my permalinks with a hack, so it's just blog and title unless you're looking at archives.)
In the main html folder, I put all the stuff that was in the b2evo folder.
I also put the following stub files:
all.php
blog.php
yellowdog.php
etc.
I use the .htaccess rules (mentioned above) so that
http://isaacschlueter.com/all/2004/08
goes to
http://isaacschlueter.com/all.php/2004/08
And I'm done.
Stub files are in the blog url.
If you want to put your other folders outside of the blog url, then you'll have to modify the settings in conf/_advanced.php in order to tell b2evo where to find its things, as well as modifying the call to b2evo that's in the stub files, and possibly b2evocore/_main.php. (Basically, anyplace that there's a hard-coded path, you might run into problems if you go around changing paths.)
So, to recap...
You want a permalink url like this:
http://example.com/stub/yyyy/mm/dd/url_title
with no ".php"
1. Put the contents of your "blogs" folder in your root. (That is, instead of installing b2evo to .../b2evolution/blogs/, install it to your html root.)
2. Use stub files, and put them in your html root folder.
3. Use the .htaccess rules to turn example.com/stub into example.com/stub.php
4. Make sure everything works.
5. Now start worrying about how to move the b2evo internal chunks around while leaving everything else working. That's a separate problem.
Here's what I haven't told you how to do. If you want to do the following things, you'll have to figure it out.
1. Have a stub in example.com/stub/stub.php and have it accessed via example.com/stub. (You could do this with a different .htaccess file and directoryindex command in each folder, and then use the folder name as the stub name in b2evo.)
2. Have stub files that are outside of your blogurl (You might be able to get around this by modifying various paths, but I haven't worked out all the details.)
3. Have your cake and eat it too. (TANSTAAFL)
11 gman Sep 08, 2004 00:17
Why put b2evo in a separate directory?
To keep things nice and organized. Have a lot of scripts and applications. Were talking about adding 12 more directories to the root of my site. :(
12 isaac Sep 08, 2004 00:44
GMan,
Ok, that's understandable.
Still, the best plan is to get it working the way that is tried and tested first, and then worry about moving stuff smoothly once you've got it working and got the permalinks you want. That way, you get a working site asap, and can clean up the back-end in your own time.
13 isaac Sep 09, 2004 00:26
14 personman Feb 15, 2005 16:52
It's been a few months since the last last post in this thread. Is there really no way to do this without installing b2evo to the root? I'm coming from MT and I like how the app is tucked away in its own folder. It's much nicer, especially when you have a bunch of things on your webspace. This is so close to working great with stubs and a little htaccess code. But since b2evo isn't installed in the root, the comment links and permalinks doin't work. Is there a neat way to trick Apache into thinking that b2evo is installed in the root?
http://forums.b2evolution.net/viewtopic.php?t=1564
{click}