I am having all sorts of trouble getting Friendly URLs to work on a site I am hosting with Network Solutions. I have done what I can to follow the MODx instructional resource (
http://rtfm.modx.com/display/revolution20/Using+Friendly+URLs), but to no avail; every time I turn on FURLS, the site entirely crashes and I need to reload the default htaccess file. I am fairly certain that the problem is somewhere in the changes I am making (or not making) to the .htaccess file.
Here are critical details about the site:
1. The site is running the latest version of Revolution
2. Hosted on a Network Solutions shared Linux server (They supposedly support FURLS).
3. The site resides in a sub-directory that is one level down from the root. For the sake of example, let’s call it sub-directory ‘xyz’
4. I am fairly certain that I have all of the FURL system settings in place. Specifically, I set the following 4 options to ‘Yes’: Use Friendly Alias Path; Use Friendly URLs; FURL Lowercase Aliases; Automatically generate Aliases.
5. I specify the ‘xyz’ subdirectory as the RewriteBase.
6. I have the following included between the head tags in all templates:
<base href="[[!++site_url]]" />
7. I clear the site cache once all changes are in place.
Here is the relevant code in the .htaccess file I have been using. As you will see, the only change is to the RewriteBase:
Options -Indexes
# MODX supports Friendly URLs via this .htaccess file. You must serve web
# pages via Apache with mod_rewrite to use this functionality, and you must
# change the file name from ht.access to .htaccess.
#
# Make sure RewriteBase points to the directory where you installed MODX.
# E.g., "/modx" if your installation is in a "modx" subdirectory.
#
# You may choose to make your URLs non-case-sensitive by adding a NC directive
# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
RewriteEngine On
RewriteBase /xyz
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
#RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# DO NOT USE BOTH
#
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
#RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.domain.com when your cert only allows https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example-domain-please-change.com.com/$1 [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Does anyone have an idea why the site completely crashes once I incorporate this.htaccess code? I have implemented FURLS on other servers without issue, but this time, I am pulling my hair out trying to get the darn things to implement properly.
Thanks in advance for any suggestions.
[ed. note: djembe last edited this post 12 years, 3 months ago.]