Re: mod_rewrite / comprehensive redirects
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Zbigniew Szalbot wrote: | Hello, | | Pietro Cerutti: |> -BEGIN PGP SIGNED MESSAGE- |> Hash: SHA512 |> |> Zbigniew Szalbot wrote: |> | Dear all, |> | |> | I know this is not Apache's mailing list, but there are so many experts |> | here that I hope someone can help me. I have the following rule: |> | |> | RewriteRule ^\.*$ /new/index.html |> | |> | This redirects the base domain to a file called index.html in 'new' |> folder. |> | |> | However, what I would really like to achieve is to redirect every php |> | file to /new/index.html, which currently does not work. |> | |> | I tried modifying the rule like this: |> | |> | RewriteRule ^\.php$ /new/index.html |> |> Try with |> |> RewriteRule ^.+\.php$ /new/index.html |> |> (not tested) | | Tested and it works. Many thanks!!! :) Good. You're welcome :) | - -- Pietro Cerutti [EMAIL PROTECTED] PGP Public Key: http://gahr.ch/pgp -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.9 (FreeBSD) iEYEAREKAAYFAkhucX0ACgkQwMJqmJVx944fNQCgsno0O1Bb6otPsvDuOBt+RXTc OpEAoMlJr7TA8pwp73pS0Xpv9at1d7hC =VIsb -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: mod_rewrite / comprehensive redirects
--On July 4, 2008 7:05:04 PM +0200 Zbigniew Szalbot <[EMAIL PROTECTED]> wrote: Dear all, I know this is not Apache's mailing list, but there are so many experts here that I hope someone can help me. I have the following rule: RewriteRule ^\.*$ /new/index.html This redirects the base domain to a file called index.html in 'new' folder. However, what I would really like to achieve is to redirect every php file to /new/index.html, which currently does not work. I tried modifying the rule like this: RewriteRule ^\.php$ /new/index.html However, this rule matches nothing (or at least does not redirect). How should I accomplish this? I just need to redirect all hits to /new/index.html until a new site is ready. If that's what you want to do, make your ErrorDocument /new/index.html and leave the rewrites alone. Paul Schmehl If it isn't already obvious, my opinions are my own and not those of my employer.