Quote from: esnyder at Jun 07, 2011, 01:23 PMSEO in MODx is kind of my specialty, so if there's somthing related to it I like to make sure I understand what's going on.
freejung, you would be my hero if you were able to help me with a FURL issue I'm trying to solve with htaccess. I've applied several approaches found here and elsewhere--some do nothing while others create a 500 error. I'm a relative htaccess neophyte, so...
My needs are simple (I believe).
First, I have a site / FURL structure like:
www.mysite.com/container/cat1/resource.html
www.mysite.com/container/cat2/resource.html
etc.
I want to accomplish the FURL:
www.mysite.com/container/resource.html
Any ideas on how to do this with htaccess?
In addition, I've tried to add rules to help with canonicals; currently my homepage
redirects with 404 with...
www.mysite.com/index
www.mysite.com/index.html
This all results from a migration I handled poorly. I'm going to have to add dozens of additional redirects because of a new site structure, and a migration of blog content from Wordpress to MODX. So, with this said, any guidance on how to successfully redirect...
www.mysite.com/old-blog-index/ to www.mysite.com/new-blog-index
OR
www.mysite.com/blog/old-post-URI.html to www.mysite.com/new-blog-index/new-post-URI.html
...would be supremely appreciated.
One more question. All site URLs are .html. Meaning, www.mysite.com/../resource.html.
I have canonicals set as
[[!++site_url]][[*alias]]
and they appear in the head like: www.mysite.com/resource (without '.html').
I
prefer the latter, so is there a system setting I'm missing?
The site I've migrated was on Evo; I'm now on Revo 2.2.10 and had none of these issues with Evo...
Thanks in advance -- any input you provide is greatly appreciated.
Here's the full htaccess (mysite=my actual domain):
RewriteEngine On
RewriteBase /
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^mysite\.com [NC]
#RewriteRule (.*) http://www.mysite.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]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
# The following directives stop screen flicker in IE on CSS rollovers. If
# needed, un-comment the following rules. When they're in place, you may have
# to do a force-refresh in order to see changes in your designs.
#ExpiresActive On
#ExpiresByType image/gif A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/png A2592000
#BrowserMatch "MSIE" brokenvary=1
#BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
#BrowserMatch "Opera" !brokenvary
#SetEnvIf brokenvary 1 force-no-vary