The page isn't redirecting properly - Error

Discussions and support about the different URL Rewriting techniques for phpBB.

Moderator: Moderators

The page isn't redirecting properly - Error

Postby sotis » Thu Jan 21, 2010 2:10 pm

After update to 6.0.2 and generate a new .htaccess
When I try to access UCP or MCP I receive:
Code: Select all
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    *   This problem can sometimes be caused by disabling or refusing to accept
          cookies.


This is my new .htaccess
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 lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{HTTP_HOST} !^www\.kaminata\.net$ [NC]
# RewriteRule ^(.*)$ http://www.kaminata.net/$1 [QSA,L,R=301]

# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
#####################################################
# PHPBB SEO REWRITE RULES ALL MODES
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^index\.php$ index.php [QSA,L,NC]
# FORUM ALL MODES
RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)(-([0-9]+))?\.html$ viewforum.php?f=$2&start=$4 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^(forum|[a-z0-9_-]*-f)([0-9]+)/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$2&t=$4&start=$6 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER ALL MODES
RewriteRule ^announces/(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$2&start=$4 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM ALL MODES
RewriteRule ^([a-z0-9_-]*)/?(topic|[a-z0-9_-]*-t)([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?forum_uri=$1&t=$3&start=$5 [QSA,L,NC]
# PHPBB FILES ALL MODES
RewriteRule ^resources/[a-z0-9_-]+/(thumb/)?([0-9]+)$ download/file.php?id=$2&t=$1 [QSA,L,NC]
# PROFILES ALL MODES WITH ID
RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)\.html$ memberlist.php?mode=viewprofile&u=$2 [QSA,L,NC]
# USER MESSAGES ALL MODES WITH ID
RewriteRule ^(member|[a-z0-9_-]*-u)([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ search.php?author_id=$2&sr=$3&start=$5 [QSA,L,NC]
# GROUPS ALL MODES
RewriteRule ^(group|[a-z0-9_-]*-g)([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$2&start=$4 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM ALL MODES (SAME DELIM)
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9_-]+)\.html$ viewforum.php?forum_uri=$1 [QSA,L,NC]
# FIX RELATIVE PATHS : FILES
RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ $1 [QSA,L,NC,R=301]
# FIX RELATIVE PATHS : IMAGES
RewriteRule ^.+/(styles/.*|images/.*)/$ $1 [QSA,L,NC,R=301]
# END PHPBB PAGES
#####################################################

DirectoryIndex index.html index.htm portal.php index.php


This is my old .htaccess and it works.

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 lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# 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 ^index\.php$ index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ 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$ 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$ 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$ viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES SIMPLE
RewriteRule ^member([0-9]+)\.html$ memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES SIMPLE
RewriteRule ^member([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS SIMPLE
RewriteRule ^group([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ 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
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9_-]+)\.html$ viewforum.php?forum_uri=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################

DirectoryIndex index.html index.htm portal.php index.php


Please help me
sotis
 
Posts: 5
Joined: Sat Sep 06, 2008 3:21 am

Advertisement

Re: The page isn't redirecting properly - Error

Postby austin881 » Thu Jan 21, 2010 6:01 pm

Have you tried commenting out this code?
Code: Select all
    RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ $1 [QSA,L,NC,R=301]


Give that a try and post back the results.
My dev playground: ModernDignity.com
Appreciate my assistance? You can thank me by linking to Chevy Truck Forum or Gas Scooters.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 248
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: The page isn't redirecting properly - Error

Postby sotis » Thu Jan 21, 2010 7:52 pm

It is fine now. Thanks a lot. :D

Do I lose some benefit of commenting this line?
sotis
 
Posts: 5
Joined: Sat Sep 06, 2008 3:21 am

Re: The page isn't redirecting properly - Error

Postby SpaceTiger » Fri Jan 22, 2010 12:12 am

Thanks austin881! :D I just had the same issue and implemented the suggested change too and it's now working. I also wonder how this effects the phpBB SEO performance.

sotis thanks for having this problem at the time I did! :wink:
SpaceTiger
 
Posts: 7
Joined: Fri Jan 22, 2010 12:05 am

Re: The page isn't redirecting properly - Error

Postby austin881 » Fri Jan 22, 2010 12:44 am

Yeah... unfortunately I don't think that is a good fix. It is more of a workaround until someone who knows more can post the fix.
My dev playground: ModernDignity.com
Appreciate my assistance? You can thank me by linking to Chevy Truck Forum or Gas Scooters.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 248
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: The page isn't redirecting properly - Error

Postby SpaceTiger » Sat Jan 23, 2010 9:08 pm

Well it seems to be something to do with using a root (or virtual root) install without the / . As this is how my htaccess is set up and it seems sostis's is as well. Of course I don't know what the heck I'm talking about and really I'm just trying to bump this thread in hopes someone more adept at these things would be kind enough to give us there wisdom in this matter. :)

Why does this only happen if the styles, etc... are enabled for rewrite with htaccess? :?:
SpaceTiger
 
Posts: 7
Joined: Fri Jan 22, 2010 12:05 am

Re: The page isn't redirecting properly - Error

Postby dcz » Sat Feb 06, 2010 4:55 pm

So this rewriterule is an attempt to help dumb client (mostly bots) who could have some trouble with the base href tag. But it's not big deal to remove / comment it.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: The page isn't redirecting properly - Error

Postby SpaceTiger » Sat Feb 06, 2010 8:04 pm

Thank you, thank you, for your response DCZ.

The problem is, when I comment it out the attachments don't show up and the links to them are broken. I am using virtual root and image name rewrite, virtual directories and Advanced Mode with most every function on except member name rewrite rules. Can I post anything to help you see the what issue is? Any suggestion on what could be done?
SpaceTiger
 
Posts: 7
Joined: Fri Jan 22, 2010 12:05 am

Re: The page isn't redirecting properly - Error

Postby SpaceTiger » Sun Feb 07, 2010 4:08 am

This:
Code: Select all
RewriteRule ^.+/phpBB/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /phpBB/$1 [QSA,L,NC,R=301]


instead of this:
Code: Select all
RewriteRule ^.+/(style\.php|ucp\.php|mcp\.php|faq\.php|download/file.php)$ /phpBB/$1 [QSA,L,NC,R=301]


works to show the styles and stop the redirect loop, but the attachments don't show in posts?

Maybe something needs to be added to this part:
Code: Select all
....|download/file.php)$....


But what? Some kind of wildcard like:
Code: Select all
....|download/file.php?*)$...


I'm just guessing...
SpaceTiger
 
Posts: 7
Joined: Fri Jan 22, 2010 12:05 am

Re: The page isn't redirecting properly - Error

Postby dcz » Fri Mar 12, 2010 12:57 pm

Try to update to latest version and report again, the .htaccess went changed a little.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: The page isn't redirecting properly - Error

Postby sotis » Sat Mar 13, 2010 10:13 pm

The same error with the new version.
sotis
 
Posts: 5
Joined: Sat Sep 06, 2008 3:21 am

Re: The page isn't redirecting properly - Error

Postby dcz » Sun Mar 14, 2010 1:05 pm

Just comment / delete that rewriterule to see if it gets better. If so, then, it's not a drama not to use this one. I'll have a look at the reasons though.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: The page isn't redirecting properly - Error

Postby sotis » Sun Mar 14, 2010 8:28 pm

Yeah, I did that and it works
sotis
 
Posts: 5
Joined: Sat Sep 06, 2008 3:21 am


Return to phpBB mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests


 
cron