PDA

View Full Version : Solved &goto=newpost links don't redirect properly



moman
27-10-10, 02:55
All requests to showthread.php?t=x&goto=newpost show blank pages and don't properly redirect.

This is a .htaccess issue (that's what vbseo support told me earlier), but their fix seemed to break something else. Do you have any idea what could be wrong here?


# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.pentaxforums\.com
RewriteRule (.*) http://www.pentaxforums.com/forums/$1 [L,R=301]

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|et|tl|fi|fr|gl|de|en|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forums/ [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|et|tl|fi|fr|gl|de|en|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/forums/$2 [L,QSA]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|vbseo_sitemap/|cron)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbenterprisetranslator_seo.php [L,QSA]

#RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
#RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]

Options All -Indexes
Options +FollowSymLinks

kamilkurczak
27-10-10, 08:02
hello,
Can you copy this rule:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule $ vbenterprisetranslator_seo.php [L,QSA]

and paste it before:

#RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
#RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]


If you disable vBET is the issue still there?

moman
27-10-10, 15:40
Thanks for the prompt response.
-Yes, the issue went away when I removed vbet's htaccess rules
-Your fix didn't change anything

kamilkurczak
27-10-10, 16:11
Hello,
so, please describe here - how I can reproduce it on your forum because I cant reproduce it and I cant see this issue.
Secondly - please paste here your server log file (file with informations about all issues on server) because we think that either function is not visible
(missing
require_once) because you have a blank page.

Thanks

moman
27-10-10, 18:13
http://www.pentaxforums.com/forums/showthread.php?t=10000&goto=newpost

Try that link as an example.

Note that there are no PHP errors or warnings on that page.

The only server issue I'm observing right now is a problem with sqlite, but the newpost issue precedes that, so this can be ignored.

What would be the best way to debug this? Maybe the vbenterprisetranslator_seo file doesn't properly forward the request to vbseo? Note that showthread.php isn't even called if you click the link above.

kamilkurczak
28-10-10, 08:02
Hello,
moman I am on your site here:

http://www.pentaxforums.com/forums/
please write where I should click to have this issue (step by step) because I must to reproduce it properly.
Thanks

moman
28-10-10, 17:51
The issue only really comes up for the end user when AJAX times out and quick replies are submitted as a regular form. It also occurs on the mobile skin that we sure for the newpost links.

All these are perfect examples of the error:
http://www.pentaxforums.com/forums/showthread.php?t=1000&goto=newpost
http://www.pentaxforums.com/forums/showthread.php?t=10000&goto=newpost

This works because the thread is nonexistent:
http://www.pentaxforums.com/forums/showthread.php?t=10000000&goto=newpost

kamilkurczak
29-10-10, 10:04
hello,

Ok so if you don't have any notes in server log file - please give me (by PM) access details to your admincp and FTP.

secondly. please describe here what I should do to reproduce this issue (step by step - no links) please describe where i shoud click, how long I should wait etc.
Thanks

moman
30-10-10, 02:10
I've fixed the problem.

In vbenterprisetranslator_seo.php, changed line 56 to:


if (isset($_GET['t']) && !isset($_GET['goto']) && false !== strpos($_SERVER['REQUEST_URI'], 'showthread.php')) {

vBET
01-11-10, 17:30
It was already like that in our code in vBET4.x - we forgot to do it also in vBET 3.x - our fault. I corrected it now - it will be included in next release.

moman
02-11-10, 16:12
Great- thanks for the note!

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translations by vB Enterprise Translator 4.10.1