JOHNCMS mod_rewrite

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    JOHNCMS mod_rewrite

    Hi,
    Can anyone help me and give me any WORKING mod_rewrite .htaccess file to change url for original johncms 4.4.0

    Would be great.
    I tried my self.(first time)
    But it's nothing working.
    hostgator.com support couldn't run it.
    crap.
    OR JUST SEND PM

    #2
    [edit: Please upload it here, thanks.]
    Last edited by arnage; 08.04.12, 13:37.

    Comment


      #3
      re

      Originally posted by sladex View Post
      Hi,
      Can anyone help me and give me any WORKING mod_rewrite .htaccess file to change url for original johncms 4.4.0

      Would be great.
      I tried my self.(first time)
      But it's nothing working.
      hostgator.com support couldn't run it.
      crap.
      hostgator are crap for a start and most hosts if u have globals function on in htaccess and also php.ini it will throw errors like 500

      edit htaccess

      Options -Indexes
      ErrorDocument 402 JohnCMS / Build 929
      ErrorDocument 403 JohnCMS / Build 929
      ErrorDocument 404 JohnCMS / Build 929
      ErrorDocument 500 JohnCMS / Build 929
      DirectoryIndex index.php

      RemoveHandler .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py
      AddType application/x-httpd-php-source .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py

      php_flag display_errors 0
      php_value error_reporting 7
      php_value register_globals 0
      php_flag session.use_trans_sid off
      php_value magic_quotes_gpc 0
      php_value magic_quotes_runtime 0
      php_value magic_quotes_sybase 0
      php_value allow_url_fopen 0
      php_value arg_separator.output "&"
      AddDefaultCharset UTF-8

      <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault A1209600
      <FilesMatch \.php$>
      ExpiresActive Off
      </FilesMatch>
      </IfModule>

      RewriteEngine On
      RewriteCond %{REQUEST_METHOD} ^TRACE
      RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
      RewriteRule .* - [F]
      Last edited by ozziemale31; 08.04.12, 13:37.









      Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
      Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free

      Comment


        #4
        try it working fine for me

        PHP Code:
        Options -Indexes
        ErrorDocument 402 http
        ://rexbd.in
        ErrorDocument 403 http://rexbd.in
        ErrorDocument 404 http://rexbd.in
        ErrorDocument 500 http://rexbd.in

        RemoveHandler .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py
        AddType application
        /x-httpd-php-source .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py

        RewriteEngine On

        RewriteRule 
        ^forum/(.*)_([0-9]+).htmlforum/index.php?id=$[L]
        RewriteRule ^forum/(.*)_([0-9]+)_p([0-9]+).htmlforum/index.php?id=$2&page=$[L]
        RewriteRule ^forum/(.*)_p([0-9]+).htmlforum/index.php?act=post&id=$[L]
        RewriteRule ^forum/(.*)_([0-9]+)_s([0-9]+).htmlforum/index.php?id=$2&start=$[L]
        RewriteRule ^forum/(.*)_([0-9]+)_clip_p([0-9]+).htmlforum/index.php?id=$2&clip&page=$[L

        if any problem reply
        Last edited by arnage; 08.04.12, 17:12.

        Comment


          #5
          i am confused. It did not work for me and my forum is not in public_html, its in a folder named 'forum'
          so where and how do it put the htaccess file

          Comment


            #6
            sorry i 4get attach it
            Attached Files
            Last edited by metulj; 17.04.12, 14:02.

            Comment


              #7
              thanks Very Much. Its works Now,
              but another little problem is that,
              the Mod rewrite, did not work on 'latest Post'

              what do i do now

              Comment


                #8
                Originally posted by bestman View Post
                thanks Very Much. Its works Now,
                but another little problem is that,
                the Mod rewrite, did not work on 'latest Post'

                what do i do now




                PHP Code:
                /*
                -----------------------------------------------------------------
                //last post by BDplanet
                -----------------------------------------------------------------
                */
                $set_forum $datauser['set_forum'] ? unserialize($datauser['set_forum']) : array();
                $settings $set['lastThemes'] ? unserialize($set['lastThemes']) : array('totalThemes' => 8'timeCache' => 30);
                if(
                $settings['totalThemes'] > && !$set_forum['viewThemes']) {
                $themesOut '';
                $file_cache 'files/cache/lastThemes.dat';
                echo 
                '<div class="mainblok"><div class="phdr">&nbsp;<b>Last forum post</b>';
                $req mysql_query("SELECT * FROM `forum` WHERE `type`='t'" . ($rights >= '' " AND `close`!='1'") . " ORDER BY `time` DESC LIMIT " $settings['totalThemes']);
                while ((
                $res mysql_fetch_assoc($req)) !== false) {
                if (
                $res['close']) $themesOut .= '<div class="rmenu">';
                else 
                $themesOut .=  $i '<div class="menu">' '<div class="menu">';
                $nickUser mysql_fetch_assoc(mysql_query("SELECT `from` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" $res['id'] . "' ORDER BY `time` DESC LIMIT 1"));
                $totalPosts mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='m' AND `refid`='" $res['id'] . "'" . ($rights >= '' " AND `close` != '1'")), 0);
                $endPage ceil($totalPosts/$kmess);
                $icons = array(
                (!
                $res['vip'] ? '<img src="../theme/' $set_user['skin'] . '/images/op.gif" alt=""/>' ''),
                (
                $res['vip'] ? '<img src="../theme/' $set_user['skin'] . '/images/pt.gif" alt=""/>' ''),
                (
                $res['realid'] ? '<img src="../theme/' $set_user['skin'] . '/images/rate.gif" alt=""/>' ''),
                (
                $res['edit'] ? '<img src="../theme/' $set_user['skin'] . '/images/tz.gif" alt=""/>' '')
                );
                $themesOut .= functions::display_menu($icons' '' ') .
                '<a href="' ___($res['text']) . '_' $res['id'] . '.html">' $res['text'] . '</a> [' $totalPosts ']';
                $themesOut .= '<div class="sub">By: ' $res['from'];
                if (!empty(
                $nickUser['from'])) $themesOut .= ' &raquo; ' $nickUser['from'];
                $themesOut .= ' </div></div>';
                ++
                $i;
                }
                echo 
                '</div>';
                if (
                $settings['timeCache'] > && time() < (filemtime($file_cache) + $settings['timeCache'])) {
                echo 
                file_get_contents($file_cache);
                } else {
                echo 
                $themesOut;
                if(
                $settings['timeCache'] > 0)
                file_put_contents($file_cache$themesOut);
                }
                }


                echo 
                '<div align="right"><a href="/forum/index.php"><b>More.. </b></a></div>';

                echo 
                '</div>'
                try it if not work give me ur last post code here

                Comment


                  #9
                  it gave me error, here is my own latest Topic
                  Attached Files

                  Comment


                    #10
                    pls bro, i am waiting

                    Comment


                      #11
                      What error do you get?

                      Comment


                        #12
                        there was no error with my own. Its just that the Mod rewrite did not work on my latest topic. So i gave him to help me Edit it. Can u help

                        Comment

                        Working...
                        X