.htaccess wrong links

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

.htaccess wrong links

Postby kakarotoBR » Tue May 06, 2008 9:34 pm

Hi. I have some problems with the instalation. First I've followed up the instalation instructions and setted everything. My forum is in installed in -www.example.com/forum where example is another name, but forum is the dir's real name. So I go to the instalation page and get a Internal Server Error. After some mindfuck I discover that the problem is the .htaccess file inside phpbb_seo dir just uploaded. So remove that file and install goes ok. Then I go to the ACP and in .htaccess tab I note that the given .htaccess links is wrong, the .htaccess given by the .htaccess ACP mod is :
Code: Select all
# 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 WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET AS FORUM INDEX
# RewriteRule ^phpbb3/forum\.html$ /phpbb3/index.php [QSA,L,NC]
# FORUM
RewriteRule ^phpbb3/[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /phpbb3/viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^phpbb3/[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /phpbb3/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^phpbb3/announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /phpbb3/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^phpbb3/([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /phpbb3/viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES SIMPLE
RewriteRule ^phpbb3/member([0-9]+)\.html$ /phpbb3/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES SIMPLE
RewriteRule ^phpbb3/member([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ /phpbb3/search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS SIMPLE
RewriteRule ^phpbb3/group([0-9]+)(-([0-9]+))?\.html$ /phpbb3/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^phpbb3/post([0-9]+)\.html$ /phpbb3/viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^phpbb3/active-topics(-([0-9]+))?\.html$ /phpbb3/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^phpbb3/unanswered(-([0-9]+))?\.html$ /phpbb3/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^phpbb3/newposts(-([0-9]+))?\.html$ /phpbb3/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^phpbb3/the-team\.html$ /phpbb3/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 ^phpbb3/([a-z0-9_-]+)(-([0-9]+))?\.html$ /phpbb3/viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
#####################################################


The phpbb3 above should be "forum" cause my forum is installed in a dir named forum, a subdir of the main domain. Then I generate the .htaccess, manually change phpbb3 to forum and put the .htaccess in domain's dir. But when I activate mod rewrite the urls are wrong. An example, instead of "www.example.com/blah-f15.html" I get "http://localhost/phpbb3/blah-f15.html" which obviously is wrong and gives a 404 error.

I've installed some times and get the same result. Interestingly, have installed the mod in a forum in a local machine and the rewrite goes fine. So whats wrong and the Internal Server Error, is it normal? Any help would be greatly appreciated.

PS: forum is here, but the mod is disabled and urls are not "rewritten"
kakarotoBR
 
Posts: 2
Joined: Tue May 06, 2008 8:33 pm

Advertisement

Postby SeO » Tue May 06, 2008 9:55 pm

Update your phpBB settings in acp, script path must be wrong.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby kakarotoBR » Tue May 06, 2008 10:08 pm

I changed my forum and forget the server settings ... :roll: Thanx its working now. Btw, thx for this great mod.
kakarotoBR
 
Posts: 2
Joined: Tue May 06, 2008 8:33 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 8 guests