Thanks Chaps,
Here’s where I am. Goal is to improve SEO and keep nice neat technology independent FURLs (so no extensions).
I reckon (guess) that Bots will not like being sent to a link which returns a 404. As things stand, with the way the htaccess works, anything that isn’t an actual file or directory gets remapped to index.php such that the actual site appears (so punter is happy) but a 404 is also returned which I think will be bad for SEO.
This is the standard MODx htaccess code
# For Friendly URLs (MODxFURLs)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
This uses L for Last but no R=301 so it is quicker (no handshake with client to tell if of the Permanent Redirect) but for me has the downside that the L(ast) rewrites locally index.html to index.php (thus displaying the page) but also means server sends a 404.
I tried moving this code
RewriteRule ^index\.html$ / [R=301,L]
to before MODxFURLs code and bingo: the client sees a redirect from www.d.com/index.html to what I want www.d.com/
This also prevents 404s and because the client sees the correct URL that I want spread around the web any links they create (in articles/blogs etc) will also be correct. Thus stopping the propogation of the old www.d.com/index.html
OpenGeek, a timely reminder about the extensions - forgot about them, and a good point about my approach causing more work but I think this is right for me. A few tests in FF with Firebug using a www.d.com/index.html bookmark results in index.html 301’d to / and this takes between 60 and 100ms (UK to UK though so could be slower elsewhere). A small price I think for good SEO and the FURLs I want. Perhaps I’ve missed something.
Assuming above is correct I’ve one problem. What URL Alias to give the home page. I was using ’home’ but this only appears in the URL when using the breadcrumbs link to home. I don’t want people bookmarking/linking to www.d.com/home as this will be back to square one. A blank URL Alias results in www.d.com/1 which is worse. Any ideas? Maybe a change to breadcrumbs?
Parthian