[TAG] Apache -- Redirect if found this "Regex"
Will
will at willstuff.net
Thu Jun 19 17:56:00 MSD 2008
I can think of two ways off the top of my head:
-create symlinks with a loop that will link the "old" .jsp files to the
new .php files
-use mod_rewrite:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.jsp$ $1.php [nc]
This will rewrite any requests for *.jsp to the equivalent *.php.
I hope this helps.
-Will
Smile Maker wrote:
>
> But for all jsp files to be redirected do it need to do anything with
>
> "FilesMatch " Directive
>
> --
> Britto
>
>
> --- On *Thu, 6/19/08, Thomas Bonham /<thomasbonham at bonhamlinux.org>/*
> wrote:
>
> From: Thomas Bonham <thomasbonham at bonhamlinux.org>
> Subject: Re: [TAG] Apache -- Redirect if found this "Regex"
> To: britto_can at yahoo.com, "The Answer Gang"
> <tag at lists.linuxgazette.net>
> Date: Thursday, June 19, 2008, 5:26 PM
>
> Smile Maker wrote:
> > Folks:
> >
> > I have recently upgraded all of my jsp's to php's and pointed my
> rr
> > to the new server.But for the backward compatibility How do i say to
> > apache "if it finds request for any "jsp " go to this
> php
> page"
> >
> Try something like this line here.
>
> Redirect 301 /howto.jsp http://yourdomain.org/howto/index.php
>
>
> Just create a new file in your conf.d directory(redirect.conf is what I
> use) put your information in it and then just restart apache.
>
> Thomas
>
> +-+--------------------------------------------------------------------+-+
> You've asked a question of The Answer Gang, so you've been sent the
> reply
> directly as a courtesy. The TAG list has also been copied. Please send
> all replies to tag at lists.linuxgazette.net, so that we can help our other
> readers by publishing the exchange in our monthly Web magazine:
> Linux Gazette (http://linuxgazette.net/)
> +-+--------------------------------------------------------------------+-+
> _______________________________________________
> TAG mailing
> list
> TAG at lists.linuxgazette.net
> http://lists.linuxgazette.net/mailman/listinfo/tag
>
>
> ------------------------------------------------------------------------
>
> +-+--------------------------------------------------------------------+-+
> You've asked a question of The Answer Gang, so you've been sent the reply
> directly as a courtesy. The TAG list has also been copied. Please send
> all replies to tag at lists.linuxgazette.net, so that we can help our other
> readers by publishing the exchange in our monthly Web magazine:
> Linux Gazette (http://linuxgazette.net/)
> +-+--------------------------------------------------------------------+-+
> _______________________________________________
> TAG mailing list
> TAG at lists.linuxgazette.net
> http://lists.linuxgazette.net/mailman/listinfo/tag
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG.
> Version: 8.0.100 / Virus Database: 270.4.0/1509 - Release Date: 6/19/2008 8:00 AM
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linuxgazette.net/mailman/private/tag/attachments/20080619/8fa21d8a/attachment.htm
More information about the TAG
mailing list