[Phpwm] Mod rewrite question

Phil Burrows phil at tektlab.co.uk
Tue Apr 1 12:26:59 BST 2008


I have always found putting a .htaccess in each directory good for security,
stopping nosey peops from snooping.

On 01/04/2008, Daniel Davies <daniel at sitedesign.net> wrote:
>
> Mike,
>
> Yep its possible using mod rewrite sending a 301 redirect.
>
> I pulled this out of my own .htaccess if it helps. It redirects all
> traffic missing the www. bit of my address to the correct, full domain.
>
> <IfModule mod_rewrite.c>
>   RewriteEngine On
>   RewriteCond %{HTTP_HOST} ^danux\.co\.uk$ [NC]
>   RewriteRule ^(.*)$ http://www.danux.co.uk/$1 [R=301,L]
> </IfModule>
>
> A google on '301 redirects' brings up hundreds of examples and scenarios
>
>
> Mike Tipping wrote:
> > I have a client who because most of their site is out of date wants to
> > redirect all english and french pages to one external site, all german
> pages
> > to another external site but still allow people to access the admin
> pages
> > and a specific campaign section called ebook.
> >
> > The site is structured like:
> >
> > /en/...
> > /fr/...
> > /de/...
> > /admin/...
> > /ebook/...
> > /other/..
> > /etc/
> > /etc2/
> >
> > I presume this is possible with Mod rewrite but everything I try gets
> the
> > whole site to redirect rather than leaving the admin and ebook links
> > working.
> >
> > Any help appreciated.
> >
> > Cheers
> >
> > Mike
> >
> >
> >
> > _______________________________________________
> > Phpwm mailing list
> > Phpwm at mailman.lug.org.uk
> > https://mailman.lug.org.uk/mailman/listinfo/phpwm
> >
>
>
>
> --
> Daniel Davies
>
> Sitedesign.net Ltd
> Birchley House
> Birchfield Lane
> Oldbury
> West Midlands
> B69 1DT
>
> Tel: 0121 543 4840
> Fax: 0121 543 4841
>
> http://www.sitedesign.net
>
> This email and its attachments may be confidential and are intended solely
> for the use of the individual to whom it is addressed. Any views or opinions
> expressed are solely those of the author and do not necessarily represent
> those of Web Sitedesign.net Ltd.
>
>
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>



-- 
Phil Burrows

Call for a strong Climate Change Bill at
www.foe.co.uk/campaigns/climate/press_for_change/email_mp/index.html

Address:
47 Brooklands Drive
Kings Heath
Birmingham
B14 6EJ

Telephone:
0121 243 6008
07883 022304
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/phpwm/attachments/20080401/731a6891/attachment.html


More information about the Phpwm mailing list