The URL used to be: www.domain.com/?my-title With WP, I have: www.domain.com/my-title
How can I silently 301 redirect the first one to the second one ? I tried many .htaccess in my current settings (dotclear is in one folder, wp in a different one), but nothing I did worked...
Thanks in advance
4:31 pm on Feb 25, 2010 (gmt 0)
You should not do this "silently," or you will end up with a bunch of old URLs floating around in search results and the files for those old URLs will also be accessible using new URLs. This is duplicate-content, and will negatively affect your search engine rankings for those files/threads/posts.
I suggest that you externally redirect all old URLs to their corresponding new URLs to avoid this.
Please post your code as a starting point for further discussion.
3:52 am on Feb 28, 2010 (gmt 0)
Thanks for your reply. What do you mean by "externally" ?
I don't know which code you need... The only thing I have is the DC engine, the WP engine and the .htaccess - which is now forcing the "www". Nothing else :(
8:23 am on Feb 28, 2010 (gmt 0)
In .htaccess use RewriteRule to externally 301 redirect all direct client requests for the old URLs. This will cause the browser, and searchengines, to make a new request for the new URL.
'Silently' implies an internal rewrite, which means that the old and new URL both continue to return '200 OK' meaning that both URLs continue to be indexed. You need to avoid that - only the new URLs should be indexed.
8:55 am on Feb 28, 2010 (gmt 0)
Ok I mixed up 301 & the meaning of silently...
Now how can I write this .htaccess ? I tried many different things, none of them worked. I always got the question mark.
Any help on that ?
Thanks a lot
10:21 am on Feb 28, 2010 (gmt 0)
Have you tried the Wordpress Redirection plugin? [wordpress.org...]
10:39 am on Feb 28, 2010 (gmt 0)
Yes I did. Nothing this kind of redirection though...
4:19 pm on Mar 1, 2010 (gmt 0)
We cannot write your code for you here -- This forum is global in reach, and we don't have enough volunteer contributors to keep up with that kind of "support." We are a discussion forum, not a free "help desk."
After reviewing the resources cited in our Apache Forum Charter, looking through our Apache Forum Library, and using the WebmasterWorld site search facilities to find related previous threads, please post your best attempt at coding a solution as a basis for on-going discussion. Links to these resources are at the top of this page.
Do you have any working mod_rewrite rules? If not, then either both of these lines or only the second line will be required ahead of the code above; You will have to test one or both, because it depends on your server configuration:
Options +FollowSymLinks -Indexes -MultiViews RewriteEngine on
Delete your browser cache after making any change to your server-side code.