PDA

View Full Version : Solved FAST CGI change breaks .htaccess for vbet outside rule



ctrenks
18-03-12, 15:39
WHen I switch to FCGI on my server (to allow xCache and speed it up) my rewite rulles all stop woorking.

if i simply remove the




#This rule must be in each directory which have to be supported (without forum directory itself)
RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]


all my rules then work. so it appears somthing in this breaks the entire .htaccess with FCGI

any ideas?

thanks
Chris

r.dziadusz
18-03-12, 18:24
Hi
Could you please show me your all .htaccess?

ctrenks
19-03-12, 15:49
<Files ~ "\.inc$">
Order allow,deny
Deny from all
Satisfy All
</Files>

Header unset ETag
FileETag None


# 2 HOURS
<FilesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2015 20:00:00 GMT"
</FilesMatch>

Options +FollowSymLinks

RewriteEngine on
RewriteBase /


RewriteRule [.]*play_casino([0-9]+) cportal/tclick.php?%{QUERY_STRING}&id=$1 [QSA]
RewriteRule [.]*play_banner([0-9]+) cportal/bclick.php?%{QUERY_STRING}&id=$1 [QSA]
RewriteRule ^casino_guide/([a-z0-9-]+).html$ index.php?id=casino_guide/$1
RewriteRule [.]*poker_guide/([a-z0-9-]+).html index.php?id=poker_guide/$1 [QSA]
RewriteRule [.]*bingo_guide/([a-z0-9-]+).html index.php?id=bingo_guide/$1 [QSA]
RewriteRule [.]*skill_guide/([a-z0-9-].+).html index.php?id=skill_guide/$1 [QSA]
RewriteRule [.]*casino_guide/reviews([a-z0-9-]+) index.php?pageid=reviews [QSA]
RewriteRule [.]*casino_guide/review-save([a-z0-9-]+) index.php?pageid=review-save [QSA]
#RewriteRule ^/?([a-z0-9-]+)\.html index.php?id=$1 [QSA]
RewriteRule ^([a-z0-9-]+)\.html$ index\.php?id=$1
RewriteRule [.]*casino-banks/([a-z0-9-]+) index.php?pageid=binfo&id=$1 [QSA]
RewriteRule [.]*casino_review/([a-z0-9-]+) index.php?pageid=info2&id=$1 [QSA]
RewriteRule [.]*poker_review/([a-z0-9-]+) index.php?pageid=info2&id=$1 [QSA]
RewriteRule [.]*bingo_review/([a-z0-9-]+) index.php?pageid=info2&id=$1 [QSA]
RewriteRule [.]*skill_review/([a-z0-9-]+) index.php?pageid=info2&id=$1 [QSA]
RewriteRule [.]*casino-banking/([a-z0-9-]+).html index.php?id=casino-banking/$1 [QSA]
RewriteRule [.]*afc_contests/([a-z]+).html index.php?pageid=$1 [QSA]



#Those rules have to be in domain main folder
#RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|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)/(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|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)* http://www.allfreechips.com/Allfreechips [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|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)/$ index.php?language=$1&vbet_outside=true [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|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)/(.*)?$ $2?language=$1&vbet_outside=true [L,QSA]


#This rule must be in each directory which have to be supported (without forum directory itself)
RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

ctrenks
20-03-12, 13:38
Any thoughts? I havent found anything online that would say this will break, I did see referance that FCGI may have no values for SERVER_ENV fields but nothing that says this should happen!

r.dziadusz
20-03-12, 14:09
Few additiona questions:
-do you use vbSEO?
-if not do have your urls with /xx/ lang code?
-is this page outside your forum directory?
-culd you show me (screeenshot or url) broken url where .htaccess is not working?

ctrenks
20-03-12, 23:24
-do you use vbSEO? - YES (no VBSEO rules though outside the forums directory
-if not do have your urls with /xx/ lang code? I have all my urls with the /XX/ lang code
-is this page outside your forum directory? - YES
-culd you show me (screeenshot or url) broken url where .htaccess is not working - any page that requires a rewrite url fom that htaccess is a 404 page



if I rem out the last two lines

RewriteCond %{QUERY_STRING} !vbet_outside=true
RewriteRule ^(.*)$ $1?vbet_outside=true [L,QSA]

everything works fine, or if I run php in suphp mode it is all OK.

ctrenks
21-03-12, 13:08
-do you use vbSEO? - Yes but not rewrites outside of forums directory where this querrystring is
-if not do have your urls with /xx/ lang code? - Yes all my pages are /XX/
-is this page outside your forum directory? - Yes
-culd you show me (screeenshot or url) broken url where .htaccess is not working? - Any page that requres the rewrite (all but the homepage and forums pages) will 404


Few additiona questions:
-do you use vbSEO?
-if not do have your urls with /xx/ lang code?
-is this page outside your forum directory?
-culd you show me (screeenshot or url) broken url where .htaccess is not working?

r.dziadusz
21-03-12, 19:18
Ok
I'm checking on it

ctrenks
23-03-12, 23:12
Can I just remove this completely and in my non forum pages simply add $vbet_outside=true

As I use a single page to parse all non forum pages this would be simple.

ctrenks
24-03-12, 00:21
Can I just remove this completely and in my non forum pages simply add $vbet_outside=true

As I use a single page to parse all non forum pages this would be simple.

ctrenks
26-03-12, 21:59
Can you tell me where the cheack is for $_GET[vbet_outside] and I can set it there possible as well.

ctrenks
27-03-12, 17:54
I thought this would be a simple 5 minute request??

r.dziadusz
27-03-12, 23:16
Sorry you have o wait so long.
Still we are working how to solve your issue.
You are trying to modificate $_GET.. manually in includes/vbenterpisetranslator_functions_redirect_utils.php
in line
if($_REQUEST['vbet_outside'] && false === strpos($url,'http')) {

ctrenks
28-03-12, 16:32
OK, I will just add a variable in my external template saying $vb_out=1 then modify the if statement with an OR as well.

Thanks,
Chris

r.dziadusz
28-03-12, 18:17
You welcom please let me if it works for you

ctrenks
28-03-12, 21:08
I think it works ok, I am seeing an issue though when i switch pages (not sure when this started) even if i revert back to normal rewrite rules.


on homepage Online Casino Guide | No Deposit Casinos | Online Casino Reviews and Casino Forum (http://www.allfreechips.com) if i switch lang, then click to another page on the left side menu i get a 500 error with a url like this

xttp://www.allfreechips.com/da/da/da/da/da/da/da/da/da/da/casino_guide/usa-online-casinos.html

this is obviously not good!

ctrenks
29-03-12, 12:32
also seeing an error on pages like Free Spin casinos in 2012 offering great free casino bonuses (http://www.allfreechips.com/casino_guide/free-spin-casinos.html) whre it takes the "de" from guide in the url and traets that as the lanf \de\

ctrenks
29-03-12, 14:04
ok, ending this thread as its resolved with the orig issue. opening a new thread.

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
vBET 4.10.1 supports automatic translations