We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16873
    • 40 Posts
    wink Finished but(though) there must be some bugs!
    If there is no rewrite mod of U’s Apache Sever, U can replace the original files by these files. Then U can switch the friendly url on!!!!

    -----------------------------------------------------------------
    有人需要吗?没有REWRITE模块的时候,也开启友好URL支持。
    现在基本完成了,可是,还需要进一步调整。
    smiley
      • 2472
      • 151 Posts

      I’m all ears Enos... smiley
        A thing of beauty is a joy forever ( John Keats)
      • How are you doing this, as it sounds very interesting and it may have some Apache log ramifications.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 36747
          • 138 Posts
          could somebody translate to english the first post please?

          I don’t have modrewrite but i need some diference between my pages. Just an ID is not enough
            patagonia, argentina
            • 16873
            • 40 Posts
            wink O There may be some Misunderstanding .

            The ’patch ’ will only enable the url active as ’http://somesite.com/index.php/some_folder/sample.html’ . It’s not active as ’’http://somesite.com/some_folder/sample.html’’.

            And it isn’t Strict Friendly urls.

            Can somebody expain the the different of the two class friendly urls for the Search Engine (http://somesite.com/index.php/some_folder/sample.html and
            http://somesite.com/some_folder/sample.html)
              • 30223
              • 1,010 Posts
              Here’s something that might work for you. I’ve just tried it out on my local dev server (Win32/apache) but I haven’t tested it extensively...

              A Warning! You will have to make changes to the actual apache server configuration. The alias directive does not work from .htaccess files.

              I created an extra php file (index2.php) in the same directory as index.php. for instance /home/httpd/html/index2.php. All this script does is to create the $_REQUEST[’q’] variable modx relies upon for friendly urls and then call the original index.php
              <?php
                //create 'q' variable
                $_REQUEST['q']=$_SERVER['REQUEST_URI'];
                //get on with business as usual
                include("index.php");
              ?>
              


              Then in the server configuration add these lines. If you have several virtual servers you can place this within the <VirtualHost> blocks.
                 AliasMatch ^/manager/(.*) /home/httpd/html/manager/$1
                 AliasMatch ^/.*\.htm.* /home/httpd/html/index2.php
              

              Note the ’htm’ in the regular expression. You schould replace this with whatever your friendly url suffix is set to! And offcourse adjust the paths to your particular situation. The first line sets an alias to any files in the manager directory to itself. Once an ailas directive is matched it will not test any further alias directives so this excludes anything from the manager directory. The second line will match any documents with an ’htm’ extension (or whatever extension/ suffix you have replaced it with) and ’alias’ to index2.php.

              Lastly you will have to turn off the rewrite engine in .htaccess or at least comment out the below RewriteRule.
              #RewriteEngine On
              #RewriteCond %{REQUEST_FILENAME} !-f
              #RewriteCond %{REQUEST_FILENAME} !-d
              
              #RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
              


              You’ll have to restart apache and off you go... friendly urls without url rewriting,... hopefully. As I said I have not extensively tested this but as far as I can see it should work.




                • 20195
                • 1 Posts
                楼主何时放出来?呵呵
                  • 16873
                  • 40 Posts
                  实在没时间搞程序了,还有许多的造型设计工作要做。其实早做到这一步了,文件包内还有个没完善的就是前台发布BLOG后不能显示内容(主要原因是没有建立索引),有兴趣的自己修改。SORRY

                  Sorry for my super delay for these files .Because there are a mass of industrial design work to complete , there are no more time to kill the bugs which make u dont’t see the blog published in the frontend( beacuse it won’t updata the index file in the cache). sORRY.........