phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
.htaccess redirect not working!

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
::  
Author Message
financialaidforum



Joined: 26 Dec 2007
Posts: 17

.htaccess redirect not working!Posted: Wed Dec 26, 2007 7:53 pm    Post subject: .htaccess redirect not working!

I ran through all of the steps of the phpBB3 SEO mod rewrite and uploaded the .htaccess to the root directory. However, it doesn't appear to be reading the .htaccess when navigating through the forum. http://www.financialaidforum.com/discussions

Here is the code:

Code:
ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 402 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 405 /error.php
ErrorDocument 408 /error.php
ErrorDocument 409 /error.php
ErrorDocument 410 /error.php
ErrorDocument 500 /error.php
ErrorDocument 501 /error.php
ErrorDocument 502 /error.php
ErrorDocument 503 /error.php


RewriteEngine On
RewriteCond %{HTTP_HOST} ^financialaidforum\.com [NC]
RewriteRule (.*) http://www.financialaidforum.com/$1 [R=301,L]

# 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$ /discussions/index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /discussions/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$ /discussions/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /discussions/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$ /discussions/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /discussions/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ /discussions/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ /discussions/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$ /discussions/viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
#####################################################



Back to top
TomaS
PR2
PR2


Joined: 08 Jun 2007
Posts: 226

.htaccess redirect not working!Posted: Wed Dec 26, 2007 8:21 pm    Post subject: Re: .htaccess redirect not working!

hi i dont know if thouse error documents are ok but try this
Code:
ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 402 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 405 /error.php
ErrorDocument 408 /error.php
ErrorDocument 409 /error.php
ErrorDocument 410 /error.php
ErrorDocument 500 /error.php
ErrorDocument 501 /error.php
ErrorDocument 502 /error.php
ErrorDocument 503 /error.php


RewriteEngine On
RewriteCond %{HTTP_HOST} ^financialaidforum\.com [NC]
RewriteRule (.*) http://www.financialaidforum.com/$1 [R=301,L]

# 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 /discussions
# 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$ /discussions/index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /discussions/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$ /discussions/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /discussions/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$ /discussions/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /discussions/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ /discussions/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ /discussions/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$ /discussions/viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
#####################################################

_________________
phpBB podpora-slovak phpBB support
slovenský preklad pre phpbb3-slovak translate for phpBB3
predaj a kupa domeny, marketing a internetove podnikanie- Slovak domain center
Back to top
Visit poster's website
financialaidforum



Joined: 26 Dec 2007
Posts: 17

.htaccess redirect not working!Posted: Wed Dec 26, 2007 8:34 pm    Post subject: Re: .htaccess redirect not working!

I don't think the ErrorDocument is a problem. I'm not sure what changes you made in the .htaccess code but still doesn't appear to work. I'm going to run through the steps again to see if there was something I missed.
Back to top
desmondfun



Joined: 18 Dec 2007
Posts: 5

.htaccess redirect not working!Posted: Thu Dec 27, 2007 11:55 am    Post subject: Re: .htaccess redirect not working!

I face the same EXACT problem. After my friend search through the .htaccess... there seems to be an error on this line

Code:
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^forum([0-9]+)/topic(-(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]


If you uncomment the above code, it will works.

It seems that the below code is making some error. Notice there is 3 opening paranthesis, but only 2 closing parenthesis.

Code:
topic(-(-([0-9]+))


Can anyone rectify this?
Back to top
desmondfun



Joined: 18 Dec 2007
Posts: 5

.htaccess redirect not working!Posted: Thu Dec 27, 2007 11:58 am    Post subject: Re: .htaccess redirect not working!

Other problems occur though. It seems that whenever i activate the

Virtual Folder

I will face the 404 error.

Can anyone rectify this?
Back to top
desmondfun



Joined: 18 Dec 2007
Posts: 5

.htaccess redirect not working!Posted: Thu Dec 27, 2007 12:44 pm    Post subject: Re: .htaccess redirect not working!

Sorry, please ignore my 2 messages above, because is my own mistake of NOT GENERATING A NEW .htaccess after configuring phpBB SEO Class Setting.

TO EVERY NEWBIE out there, pls GENERATE A NEW .htaccess if you configure the phpBB SEO Class Setting.

----------------------------------

Before this, I also face the same problem of not being able to read the .htaccess file. This is most likely NOT phpbb-SEO problem, but your own server configuration problem.

Remember to RESTART Apache as well.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15242

.htaccess redirect not working!Posted: Thu Dec 27, 2007 3:27 pm    Post subject: Re: .htaccess redirect not working!

@financialaidforum

Where did you upload you .htaccess ? And did you generate a new one after you set the mod options ?

The .htaccess you posted here is meant to be uploaded at the domain root level. It seems you activated the virtual root option in this one.

Then, you should delete :

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^financialaidforum\.com [NC]
RewriteRule (.*) http://www.financialaidforum.com/$1 [R=301,L]


and add the www prefix redirection after :
Code:
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION


Just :
Code:
RewriteCond %{HTTP_HOST} ^financialaidforum\.com [NC]
RewriteRule (.*) http://www.financialaidforum.com/$1 [R=301,L]


But it's not what was causing trouble IMO, and not the error page either.

Ultimately, does your host support mod_rewrite ?

@desmondfun

What do you mean when you say :

desmondfun wrote:
If you uncomment the above code, it will works.


?

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
Page 1 of 1

Navigation Similar Topics

Jump to: