We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24708
    • 8 Posts
    I have been reading documentation about this but haven’t had any luck for some reason.

    I’d like for my install on www.mysite.com/modx to look as though it’s running on www.mysite.com

    I need to point the site to the subdirectory (that shouldn’t be a problem) but fix the friendly URLs to take "modx" out of the address name. Right now the friendly URLs are working with "modx" in the address name.

    I’ve asked my server to help but they just want to turn my subdirectory into the root directory which I would like to avoid doing.

    I have the following code in my .htaccess file:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /modx
    
    # 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\.mysite\.org [NC]
    #RewriteRule (.*) http://www.mysite.org/$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 ^(.*)$ /modx/index.php?q=$1 [L,QSA]
    
    #for tags 
    #RewriteCond %{REQUEST_URI} ^/utilites/tags.html?tags=(.+?)&start=0$ [NC]
    #RewriteRule (.*) /tags/$1/ [L,QSA,NC]
    
    
    #RewriteCond %{REQUEST_URI} /(.+?)/pagina-(.+?)/ [NC]
    #RewriteRule ^tags/alumni/$ utilities/tags.html?tags=alumni&start=0 [L]
    #RewriteRule ^utilities/tags\.html\?tags=(\w+)\&start=0$ /tags/$1 [L,QSA]
    #RewriteRule ^tags/(.*)/$ utilities/tags.html?tags=$1&start=0 [L,QSA]
    
    # Reduce server overhead by enabling output compression if supported.
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5
    
    #php_value upload_max_filesize 20M
    #php_value post_max_size 20M
    
    


    I have tried the RewriteRule as this too:

    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    


    Any suggestions? Help would be greatly appreciated!!!!! Thanks in advance.