We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14214
    • 299 Posts
    Recently I moved hosts and am getting ready to launch my site but noticed my friendly URL’s are not really acting friendly.

    My settings for FURLs:
    Use FURL: Yes
    Prefix: (blank)
    Suffix: .php
    Friendly Aliases: Yes
    Friendly Path: Yes
    Duplicate Alias: Yes
    Auto Gen Alias: Yes


    My .htaccess is below:
    
    #php_flag zlib.output_compression On
    #php_flag zlib.output_compression On
    #php_value zlib.output_compression_level 5
    
    # Rewrite directives here for SEF (Search Engine Friendly) URLs
    
    RewriteEngine On
    RewriteBase /
    
    <Files ~ (\.php)>
      Options +FollowSymLinks
    </Files>
    
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    # If your MODx installation is in a subdirectory, change the following line to match the physical
    # path to the "root" of the site as follows:
    # RewriteRule ^(.*)$ /root/www/directory/index.php?q=$1 [L,QSA]
    
    
    RewriteRule ^(.*)$ http://%{HTTP_HOST}/index.php?q=$1 [L,QSA,NC]


    When I mouse over a link or look at properties of a link it reads: http://www.mysite.com/page-alias.php
    What the actual URL in address bar reads after the new page/link loads: http://www.mysite.com/index.php?q=page-alias.php

    This causes problems with Google and other bots trying to index pages. I have attempted to change the RewriteRule to:
    RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [L,QSA]
    but when I did this my pages never resolved and eventually timed out.

    Really appreciate any insight some of the pro’s on this board may have. Thanks in advance.

    -J

      • 14214
      • 299 Posts
      One more note; if I type in my browser the address: http://www.mysite.com/page-alias.php the end url that the page directs to is http://www.mysite.com/index.php?q=page-alias.php. Don’t know if that info helps or not...

      -J