Forum Moderators: phranque
I've just uploaded a new version of the website. All my 301 redirects and other rewrite rules are working but I can't seem to get this one.
Google has a large number of old cgi generated dynamic pages with high ranking. I'd like to redirect those pages to a single static URL called /gallery.htm with a [R=301] so folks don't wind up with a 404 error.
The URLs in Google look like:
www.aquariumprofessionals.com/cgi-bin/pro/emAlbum.cgi?c=show_image;p=Fish%20and%
(cgi-bin is outside the root html directory)
I've tried a lot of different variations of full Mod Rewrite and Cond and cannot get this one down. I've found many examples to create SE friendly links from dynamic pages but none which redirect all the dynamic pages to a single static page.
Any help would be greatly appreciated. My knowledge of Apache is quite limited. Thanks in advance.
Any mod_rewrite code would then have to go into /cgi-bin or into a directory above /cgi-bin, or into the server config file. Be aware that if Alias or ScriptAlias directives are processed first, they will 'steal away' the URL-path before mod_rewrite can change it. And be aware that module execution order is what will determine this; the ordering of the mod_alias versus the mod_rewrite directives in configuration files is irrelevant.
Jim