Here’s a questions from my friend Diana at Ustandout.com, a great site that offers social media and internet marketing tips. She had just migrated her blog from an IIS server to a Linux box. In doing so, she had to change the URL structure of her site, which caused an important inbound link to Ustandout.com to break.
“Originally, my blog was hosted on my dad’s IIS server, and the links all read http://ustandout.com/index.php/blog-post-name. After transferring the blog to a linux server, we created an .htaccess file to redirect all http://ustandout.com/index.php/blog-post-name to http://ustandout.com/blog-post-name.
Over the weekend, I transferred my U Stand Out blog from my dad’s server to my own GoDaddy-hosted linux server (I figured it was time to take control of my own hosting, haha). The .htaccess file is still there. However, external sites linking to my blog via the original link (/index.php/blog-post-name) no longer work.
As an example, Mashable was linking to one of my blog posts: http://ustandout.com/twitter/free-twitter-badges, but their link reads http://ustandout.com/index.php/twitter/free-twitter-badges, so it doesn’t work. I was getting tons of traffic from this one mention, and now I’m not.
So I know you have experience with redirects, and I just don’t know enough about this kind of thing to research and find a solution (trust me, I’ve tried, and I broke my whole site for a while haha). Do you have any idea how I can make /index.php/blog-post-name redirect to /blog-post? Any help would be much appreciated, but if you’re too busy to think about this I understand!!
“Diana, As far as your question goes – here are my thoughts:
If I’m understanding you correctly, it seems like you implemented a general redirect rule using regular expressions in your .htaccess file that only works for a specific URL format. It only redirects all http://ustandout.com/index.php/blog-post-name to http://ustandout.com/blog-post-name.
The link from Mashable also links to you /twitter/ directory which doesn’t seem to be covered by your existing 301 redirect rules. I’d recommend creating a custom 301 redirect rules that works specifically on the URL that is linked to from Mashable. In other words, try adding this:
redirect 301 /index.php/twitter/free-twitter-badges http://ustandout.com/index.php/twitter/free-twitter-badges
But assuming this works, it doesn’t solve your problem site-wide. So, if you send my your .htaccess file maybe I can take a look at it.
Diana added the line of code to her .htaccess file and it solved the problem. Issue resolved.
Have A Questions?
If anyone out there has any questions, SEO-related or otherwise, please shoot me a line and I will do my best to help you.