Results 1 to 2 of 2
Mar 25, 2012, 16:47 #1
- Join Date
- Feb 2007
- 0 Post(s)
- 0 Thread(s)
301 Redirect Returns 404 Not Found Error
So I'm in the process of migrating an old site based on a CGI script based to Wordpress. For right now I want to redirect a few individual pages on octools.com to another domain, octools.net. Here's my .htaccess file:
Redirect 301 /index.cgi?caller=articles/mushkin/pc4400/pc4400.html http://www.octools.net
Oddly, I'm getting a 404 Not Found error.
Not Found The requested URL /index.cgi was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Any idea on how to get this working? It's worth noting that I don't have the script on my server-- I recently acquired this site and didn't receive the CGI script due to licensing reasons.
Mar 25, 2012, 21:30 #2
- Join Date
- Feb 2002
- 19 Post(s)
- 3 Thread(s)
You want to change a .com linked script and query string to a domain? That's undoubtedly how Apache interprets it. If this is all of your .htaccess (i.e., not using a DirectoryIndex with index.cgi before anything else in the DocumentRoot), then Apache is doing exactly what you specified.
What are you really trying to do? Use WP? Then address the WP handler script (index.php) in your Redirect statement.
If .com and .net are superimposted, share the DocumentRoot, then merely use a redirect from index.cgi to index.php. If you need to retain the query string, use mod_rewrite to redirect (the query string will go along without you doing anything special. You're making it harder than it really is.