We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22243
    • 2 Posts
    i have friendly url setup and it works fine. i wanted to be able to pass a variable in the url without the ugly query string
    instead of mysite.com/modx/videos/?vid=file i would like mysite.com/modx/videos/file/
    The current mod_rewite rule is this

    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /modx/index.php?q=$1 [QSA,L]

    i would like to rewrite /modx/videos/(nameofvideo)/ index.php?q=videos&vid=$1

    RewriteRule ^\videos\([A-Za-z0-9-]+)/?\$ /index.php?q=video&vid=$1
    RewriteRule ^(.*)$ /modx/index.php?q=$1 [QSA,L]

    Is this possible? I have tried different rewrite rules with no success