Skip to main content Help Control Panel

YACS CMS : Open source !

Community «   Le forum «   Soupçons de bogues «   Retour migration vers 7.6beta «  

Comment: Retour migration vers 7.6beta

<< Previous  
FIX in 7.6 for pretty url (option 2 view.php/37/news style...

Mine were broken after upgrading to 7.6 - and after weeks of optimizing my site for Google and Yahoo (and getting more successful by the day) - the idea of losing that work completely sent me into a fit. But I figured out what works for me. [php 4.4.0 is on my server]

BERNARD - MAKE THIS FIX (if it's universal):

In shared/global.php

Instead of using:

$_SERVER['PATH_INFO']

use

$HTTP_SERVER_VARS('ORIG_PATH_INFO']

This is the result:

// analyze script args (e.g. 'articles/view.php/123/3', where '123' is the article id, and '3' is the page number) if(isset($HTTP_SERVER_VARS['ORIG_PATH_INFO']) && strlen($HTTP_SERVER_VARS['ORIG_PATH_INFO'])) {

// split all args, if any, and decode each of them $context['arguments'] = array(); $arguments = explode('/', substr($HTTP_SERVER_VARS['ORIG_PATH_INFO'], 1)); if(is_array($arguments)) { foreach($arguments as $argument) $context['arguments'][] = rawurldecode($argument); } }

I don't know if it matters, but here's my .htaccess: [it might have made a difference!]

# This file adds nice features to YACS # # Uncomment directives below depending of your needs. # Do this one block at a time. # Then load the main index page of your YACS server. # If you experiment a 500 Internal Server Error then # go back to the commented version. # # More support at http://www.yetanothercommunitysystem.com/ #

# ask Apache to redirect to pretty error pages # #ErrorDocument 401 /yacs/error.php?error=401 #ErrorDocument 403 /yacs/error.php?error=403 #ErrorDocument 404 /yacs/error.php?error=404

# disable directory browsing below this directory # #Options -Indexes

# set the default handler to index.php # DirectoryIndex index.php

# translate authentication data if PHP runs as CGI -- see agents/feed.php # # # RewriteEngine on # RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L] #

#download palm files # AddType application/octet-stream .prc .pdb RewriteBase / SetEnv TZ US/Eastern AddDefaultCharset US-ASCII

ForceType application/x-httpd-php

I could optimize it, but since it works now - I'm not changing a THING!

I'm using PHP 4.4.0 Solution hint finally found (after hours of searching) AT:

http://www.dew-code.com/modules/newbb/viewtopic.php?topic_id=683&forum=8

Ken http://free.naplesplus.us/

by Simplify3 on Jul. 3 2007