Topic: URL rewrite with portal

An error was encountered

The web server you are using is not correctly setting the REQUEST_URI variable. This usually means you are using IIS6, or an unpatched IIS7. Please either disable SEF URLs, upgrade to IIS7 and install any available patches or try a different web server.

Cant get working URL scheme!

My htaccees

RewriteEngine On
RewriteRule ^news?$ index.php?page=news [L]
RewriteRule ^chat?$ index.php?page=chat [L]

Forum location

When forum Mod rewrite is working ,the i get top error and it from punbb on my custom pages where i include
this code

    define('FORUM_ROOT', $forum_path);
    define('PUN_TURN_OFF_MAINT', 1);
    define('PUN_QUIET_VISIT', 1);
    if (!empty($_POST['noforum'])) {
        define('FORUM_DISABLE_CSRF_CONFIRM', 1);
    require FORUM_ROOT.'include/common.php';
    require FORUM_ROOT.'include/parser.php';

Where can be problem?

Re: URL rewrite with portal

This error appears when Forum tries to fix the request URI, if it is not set correctly. Try this: before including this peace of code on custom (not forum) pages you can ignore this checkup for correct URI requests by defining a constant:


Report if this method will work. Also the constant "PUN_TURN_OFF_MAINT" was renamed to "FORUM_TURN_OFF_MAINT", and "PUN_QUIET_VISIT" to "FORUM_QUIET_VISIT" in PunBB 1.3


Re: URL rewrite with portal

Yes it works!
To add forum to your .htaccess ,i use this line.

RewriteRule ^forum/.* forum/rewrite.php [L]

Maybe somebody will need this smile