If this problem has already been posted somewhere, feel free to just direct me there, but after a bit of searching I couldn’t find anything similar. Here’s my problem:
We are redesigning a website and plugging it into modx. For SEO reasons, it is very important that we maintain old link urls (which of course are a pain in the you know what). Anyway, I have replicated with the page tree as best I can to allow for the same urls, but I have to have some extra levels to get the navigation to display correctly with Wayfinder. Here’s the difference in URLs:
Should Be: .com/soap/green-soap.html
Am Getting: .com/products/soap/green-soap.html
With a little tweaking of the .htaccess (which I am really clueless on) I was able to get /products/ rewritten out of the URL, but now modx is redirecting me to the 404 for all pages that have been affected. Below you can see what I did to the .htaccess. Before this change, I just used the default one that comes with a modx install. Site is running on Evolution 1.0.
# For full documentation and other suggested options, please see
# http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
# including for unexpected logouts in multi-server/cloud environments
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# To maintain old URL path
#RewriteRule ^load_cells1(.*) load_cells/$1
RewriteRule ^products/?(.*) /$1 [R=301,L]
#RewriteRule ^products/?(load_cells/)?(.*) /$1/$2 [R]
#RewriteRule ^products/([^/]+)/([^/]+)?(.*) /$1/$2$3 [NC]
# 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} !^example\.com [NC]
#RewriteRule (.*) http://example.com/$1 [R=301,L]
# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Reduce server overhead by enabling output compression if supported.
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
Thanks!