|If Windows IIS serves your pages, you're not left out of the Friendly URLs party, but optimal solutions do require a commercial IIS add on. For more information, see the SEO Friendly URLs with IIS page in the MODx forums.
For other web servers such as Zeus or lighttpd, see our General Requirements page under supported web servers.
Make sure RewriteBase points to the directory where you installed MODx. E.g., "/modx" if your installation is in a "modx" subdirectory:
Note in the last block of directives the gzip compression was left commented out since this can potentially cause issues in some environemnts. For a faster webserver experience, ucomment the last two lines as follows:
You may also want to make your URLs non-case-sensitive by adding a NC directive to the directive in the "For Friendly URLs" part:
If you prefer your website to always add the "www." part to always show "www.example.com" URLs, then the section below should be changed as follows:
If you're working off of virtual domains and have a preview for development or while waiting for DNS updates to occur such as accessing your site through http://10.0.0.1/~myacct, the rewrite rule should be written as follows. Don't forget to change it back when you go live.
If you would like to limit the manager to being accessed by only a specific IP address, but need access to some things on the public site like the captcha, use the following. Make sure this goes inside the Manager directory:
|The first line ("Options +FollowSymlinks") may need to be commented out in some situations where a similar line is present in the site install root to prevent server errors.|
If you are deployed in an environment that has problems with aggressive garbage collection, as evidenced by unexpected and frequent logouts from the manager, then you can adjust the location of the sessions to remove them from the default and shared global tmp/session location:
|If you add this to your .htaccess file, make sure to also add it to the .htaccess file located in the /manager directory.|
By default, MODx Evolution's htaccess template file excludes the /assets and /manager directories from rewrite rules. If you are using a MODx document as a CSS file, you'll need to adjust the one line to allow rewrites in the /assets directory if that's where you store your CSS file.
If you still wish to maintain some subdirectories in the exclusions, you could disable /assets/images and /assets/snippets for example with the following rule:
Some servers do not have their timezone settings set, which can cause issues. You can try the following setting with full details of timezone definitions available at http://php.net/manual/en/timezones.php
Really, you should fix your code and database to handle character sets properly. But, if you insist, please see http://httpd.apache.org/docs/2.0/mod/core.html#adddefaultcharset and you might consider using:
If your server has register_globals enabled (and it's not possible to disable), run as fast as possible to a new webhost. Seriously.
Your site is almost 99.99999% absolutely destined to be hacked at some point by script kiddies with register_globals on, ESPECIALLY in shared hosting environemnts. This is an inherrent security risk, equivalent to letting a baby play with a loaded gun and hoping they don't pull the trigger. If you're paying under $15/month, you're on a shared host. For more information: http://php.net/register_globals
To verify that this option has been set to OFF, open the Manager and choose Reports -> System Info and then click the phpinfo() link. Do a Find on Page for "register_globals". The Local Value should be OFF. If the Master Value is OFF then you do not need this directive here.
IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS:
Your server does not allow PHP directives to be set via .htaccess. In that case you must make this change in your php.ini file instead. If you are using a commercial web host, contact the administrators for assistance in doing this. Not all servers allow local php.ini files, and they should include all PHP configurations (not just this one), or you will effectively reset everything to PHP defaults. Consult www.php.net for more detailed information about setting PHP directives.
If htc files are being used on your site, some servers may serve this with the incorrect mime type. The following can be added to resolve this. The following is critical for MS Windows XP SP2 surfers:
The following directives stop screen flicker in IE on CSS rollovers. When they're in place, you may have to do a force-refresh in order to see changes in your designs.
|.htaccess directives provide directory-level configuration overrides when you cannot access the main Apache httpd.conf file. The main configuration file should be used for server directives whenever possible because .htaccess rules result in increased page processing times.|