We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4103
    • 11 Posts
    Hello everyone I have a problem related with rewrite url.
    When I use Friendly URLs from admin site then all link in menu work fine.

    If I have a page with id 1 and alias URL =’this-is-test-page’ then on my index.php page it show me Friendly URLs
    this-is-test-page.html which is fine.

    But when I use the direct url index.php?id=1 its not convert to Friendly URLs this-is-test-page.html.I think this is a problem.
    Please help me to solve this problem.

    My htaccess file seating is---

    # 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
    
    #php_flag register_globals Off
    #AddDefaultCharset utf-8
    #php_value date.timezone Europe/Moscow
    
    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /aquevix
    
    # 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\.example\.com [NC]
    #RewriteRule (.*) http://www.example.com/$1 [R=301,L]
    
    # Exclude /assets and /manager directories and images from rewrite rules
    RewriteRule ^(manager|assets)/*$ - [L]
    RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
    
    # For Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /project/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
    


    Thanks.
    Brijesh Singh.
    Aquevix Solutions Pvt Ltd.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It’s not supposed to work that way. It only rewrites incoming requests using friendly URLs to one that MODx can work with.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org