Using Mod_Rewrite in HTTPD.CONF file

Posted by Mike Lovely on Stack Overflow See other posts from Stack Overflow or by Mike Lovely
Published on 2013-10-21T15:51:57Z Indexed on 2013/10/21 15:53 UTC
Read the original article Hit count: 154

Filed under:
|
|

I want to rewrite URLs so when a user goes to;

http://www.example.com/applications/newWeb/www/index.php?page=48&thiscontent=2660&date=2013-10-11&pubType=0&PublishTime=09:30:00&from=home&tabOption=1

and if the URL contains thiscontent=2660 (which in this example above, it does) I want to redirect them to;

http://www.example.come/index.php/publications/finance-and-economics/departmental-resources

I have about 30 different thiscontent=XXXX types and imagine I’ll have to copy and edit this rule 30 different times for any links to my old website still knocking around out there.

I have access to my httpd.conf file but have never done a mod_rewrite before.

I also don't really need these showing up in the error logs as 301s. Will that happen? Because at the moment there are hundreds!

© Stack Overflow or respective owner

Related posts about apache

Related posts about mod-rewrite