| |
|
| :: |
| Author |
Message |
lionheart
Joined: 08 Mar 2007 Posts: 15
|
Posted: Thu May 15, 2008 11:09 pm Post subject: virtual root problem |
|
|
hi,
i have the phpbb seo premod running, installed in a folder, using virtual root folder option.
my problem: when i access my site, example.com, i'm not being redirected to the forum.
this is my .htaccess
| Code: |
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
# You may need to un-comment the following line
Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION
#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^forum\.html$ /root/index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /root/viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /root/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^annonces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /root/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /root/viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES SIMPLE
RewriteRule ^membre([0-9]+)/$ /root/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES SIMPLE
RewriteRule ^membre([0-9]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /root/search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS SIMPLE
RewriteRule ^groupe([0-9]+)(-([0-9]+))?\.html$ /root/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /root/viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^sujets-actifs(-([0-9]+))?\.html$ /root/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^sans-reponses(-([0-9]+))?\.html$ /root/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^nouveaux-messages(-([0-9]+))?\.html$ /root/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^equipe\.html$ /root/memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES
# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))?\.html$ /root/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
|
"root" is the forlder name containing my phpbb files, not my server root.
thank you for your help! |
|
|
| Back to top |
|
 |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3103
|
Posted: Fri May 16, 2008 9:07 am Post subject: Re: virtual root problem |
|
|
If yourdomain.com/forum.html works, everything should work.
The "problem" is that when you load yourdomain.com/ the server will try to open index.html, index.htm and index.php by default, if none of them exist, it will either list the files in the root dir or send à 403 header (in case directory listing is denied).
We did not used index.html as default rewriting for the forum in order to allow user to use a separate home page (which is usually the reason to use the virtual root option).
There is no real point to use the virtual root option if you do not plan to use another application together with phpBB. If so, you'd better install it in the root directory directly.
To make my answer complete still, you can thus use index.html for the forum index instead of forum.html (it's explained in the install file, you just need to edit the phpbb_seo_class.php file and regenerate an .htaccess) or, you can add a static index.hml and use it as the site's home page, or you can keep forum.html and play with the DirectoryIndex in the .htaccess. It's the option that will tell the server which file to load by default.
| Code: | | DirectoryIndex index.php index.html index.htm forum.html |
At the beginning of your .htaccess will do the trick to link yourdomain.com/ to yourdomain.com/forum.html  |
_________________
|
|
| Back to top |
|
 |
lionheart
Joined: 08 Mar 2007 Posts: 15
|
Posted: Fri May 16, 2008 11:33 pm Post subject: Re: virtual root problem |
|
|
thank you! it works.
but one more thing, i made the changes you pointed out to have index.html as my index but this is the situation now.
when i go to
-www.mysite.com i immediately get redirected to -www.mysite.com/index.html
-www.mysite.com shows a PR3
-www.mysite.com/index.html is PR0
is it not possible to simply have -www.mysite.com right away show my forum index page?
and is this not going to affect my rankings?
thank you |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3103
|
Posted: Sat May 17, 2008 8:01 am Post subject: Re: virtual root problem |
|
|
| SeO wrote: |
There is no real point to use the virtual root option if you do not plan to use another application together with phpBB. If so, you'd better install it in the root directory directly.
|
For real, why don't you install phpBB in the domain's root (example.com/), the virtual root option really is handy for when you do not have the choice and must install phpBB in a sub directory (for example if wordpress is installed in the root dir). It's handy in such cases to shorten URLs.
In virtual root mode, the use of the forum index file (the virtual one) is forced because it's the only way to load the forum at the root level, since it's not really there (only virtually thanks to the mod_rewrite magic). |
_________________
|
|
| Back to top |
|
 |
lionheart
Joined: 08 Mar 2007 Posts: 15
|
Posted: Mon May 19, 2008 12:46 am Post subject: Re: virtual root problem |
|
|
| SeO wrote: | | SeO wrote: |
There is no real point to use the virtual root option if you do not plan to use another application together with phpBB. If so, you'd better install it in the root directory directly.
|
For real, why don't you install phpBB in the domain's root (example.com/), the virtual root option really is handy for when you do not have the choice and must install phpBB in a sub directory (for example if wordpress is installed in the root dir). It's handy in such cases to shorten URLs.
In virtual root mode, the use of the forum index file (the virtual one) is forced because it's the only way to load the forum at the root level, since it's not really there (only virtually thanks to the mod_rewrite magic). |
thank you for your help, i was only playing with my options because i didn't decide yet how i will setup my site....
thank you! |
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|