1 csn Jan 08, 2005 20:19
3 isaac May 21, 2005 02:22
I'm not much for mod_alias, but I know a thing or two about mod_rewrite. This would get the proper file loaded:
RewriteEngine On
# If the subject/extrapath does not match an existing file, call b2evo!
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^b2evo/blog/(blog1|blog2|blog3)(/.*)?$ b2evo/index.php
# If no blog is called, then call index.php
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^b2evo/blog b2evo/index.php
It won't work because b2evo is looking at $_SERVER['REQUEST_URI'] to determine which blog to load, and even though you've told Apache which file to load, you haven't set the REQUEST_URI properly to have b2evo know what to do with it.
Try putting this at the top of your index.php, along with the .htaccess above:
$_SERVER['REQUEST_URI'] = preg_replace('#^/b2evo/blog#', '/b2evo/index.php', $_SERVER['REQUEST_URI']);
Does that work?
4 xangelusx Sep 11, 2006 18:15
You can try this as well - http://forums.b2evolution.net/viewtopic.php?t=9251
I also tried this, but it doesn't work either:
AliasMatch /b2evo/blog/(.+) /var/www/html/b2evo/index.php/$1