Results 1 to 2 of 2
I deleted a php database forum on my static html website and now I'm getting all sorts of 404 errors in webmaster tools.
I tried to do a redirect to ...
- 07-15-2011 #1Just Joined!
- Join Date
- Jul 2011
- Posts
- 1
301 redirect errors
I deleted a php database forum on my static html website and now I'm getting all sorts of 404 errors in webmaster tools.
I tried to do a redirect to my home page for example this page
mydomain.com/forum/viewtopic.php?f=4&t=73&start=0
now redirects to my home page but the url is
mydomain.com/?f=4&t=73&start=0
what should my code in htaccess be?
What am I doing wrong?!
Thanks
Mark
- 07-15-2011 #2
If you want to discard the query string, this should suffice, but of course requires that you do not have other parameters of these names in use:
I haven't tested this regexp yet. If it doesn't work, have a look at the mod_rewrite documentation.Code:RewriteCond %{QUERY_STRING} ^(([ft]|start)=\d+)+$ RewriteRule ^.*$ http://example.com/ [L,R=301]
By they way, you should use example.com, example.net or example.org as example domains. These are reserved for this purpose. Other domains might be owned by someone.Refining Linux Advent calendar: “24 Outstanding ZSH Gems”


Reply With Quote