We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14864
    • 24 Posts
    I am trying to get the friendly urls to work with my VPS server with no luck.
    The server is a Verio Linux VPS.
    I have this installed in a subfolder(blog) of the main website.

    Here is my .htaccess
    ## START PHP
    AddType application/x-httpd-php .php
    Action application/x-httpd-php /cgi-bin/php5.cgi
    ## STOP PHP
    
    # For full documentation and other suggested options, please see
    # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    # including for unexpected logouts in multi-server/cloud environments
    # and especially for the first three commented out rules
    
    #suphp_configpath /
    #php_flag register_globals Off
    #AddDefaultCharset utf-8
    #php_value date.timezone Europe/Moscow
    
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /blog/
    
    # Fix Apache internal dummy connections from breaking [(site_url)] cache
    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
    RewriteRule .* - [F,L]
    
    # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^www\.naylaw\.com [NC]
    RewriteRule (.*) http://www.naylaw.com/$1 [R=301,L]
    
    # Exclude /assets and /manager directories from rewrite rules
    RewriteRule ^(manager|assets) - [L]
    
    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    
    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5


    Any help would be great.

    Thank you.
      • 26016
      • 561 Posts
      I would think that because you’re installed in /blog...

      this line:
      RewriteBase /


      should look like this:
      RewriteBase /blog/


      and in some server environments, you may need this in your template:

      <base href="[(site_url)]"></base>


      Cheers, Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 14864
        • 24 Posts
        I have done both of those things, and still doesn’t work.

        Here is the link to the index page. http://www.naylaw.com/blog

        If you click on the test link on the right column it should go to this page http://naylaw.com/blog/index.php?id=2 which should have the friendly url of testing.html the url in the address bar changes but the actual page does not.

        Any insights would be helpful.