Forum Moderators: phranque

Message Too Old, No Replies

301 redirect

redirecting database generated files

         

Istvan

3:01 pm on Jul 19, 2004 (gmt 0)

10+ Year Member



Hi,

Currently I am switching certain parts of my site from a database generated type of files to a static html files. The urls when using the database look like: [mysite.com...] , I want to redirect this to [mysite.com...]

Now I made the following 301 redirect:
redirect 301 /folder/folder2/folder.cgi?nr_group=250&group=group1 [mysite.com...]

which does not work, although: redirect 301 /folder/folder2/folder.cgi [mysite.com...] works. But then everything and all groups are redirected to [mysite.com...]

I want to redirect every page with a "?" after folder.cgi to an unique page (which has the same content, but its loaded in a html file).

Is there a way I can achieve this?

Istvan

gergoe

7:07 pm on Jul 19, 2004 (gmt 0)

10+ Year Member



You'll need to use mod_rewrite to achieve this; there are several posts about this topic like this one [webmasterworld.com], or if you wish to make it from the stratch, see the RewriteCond, RewriteRule directives and the QUERY_STRING variable in the mod_rewrite documentation [httpd.apache.org]