-
- 119 Posts
Hi guys,
I've taken over a site (2.2.11) recently running on IIS. I have strict friendly URLs turned on, but requests to /index.php?id=23 for example are 302 redirecting to the canonical URL rather than 301 which I believe is what the strict setting is supposed to do. I don't really want to have to set up redirect rules for each URL but the SEO company is insisting that these 301 redirect. Does anyone have a steer on how to change the type of redirect?
Thanks,
Chris
-
- 2,877 Posts
Some thoughts and pointers:
"Redirector is a management tool for your 404 / 301 redirects on your site."
http://rtfm.modx.com/extras/revo/redirector
This post is 4 years and 11 months old
http://forums.modx.com/thread/16922/simple-301-redirect-question#dis-post-91816
// Personally I don't do 301 directs but let a search plugin on 404 suggest new address to the visitor
or just set up the old address as a weblink.
Google rank new pages super-fast and if the _content_ of the old page is changing so will the rankings too in a short time.
-
- 119 Posts
Thanks for the reply, but the issue isn't with changing urls but with how MODX handles redirecting to the friendly url then the index.php?id=xxx url is used. Both are valid ways for MODX to serve the content, but the id=xxx version should 301 direct rather than 302. If I could find it in the source I'd happily hack it...
-
- 2,877 Posts
Have a look at the sendRedirect() functions as discussed here:
http://tracker.modx.com/issues/98
// IIS expert >>
http://forums.modx.com/u/onesmarthost
-
- 73 Posts
Ouch, if that is the case: not good.
Has this problem been reported to the github already? That way, the team can act on it.
-
- 2,877 Posts
-
- 119 Posts
So it turns out it's a bug in IIS7 which sends 302 headers instead of 301 or even 404 from the PHP cgi process. There's a patch for it which the hosts have applied and all is well now.
-
- 2,877 Posts
Nice! Thanks for reporting back, it's now added to google!
http://bit.ly/LPD5E8