Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Do you hide .pl extension on web pages?

by Melly (Hermit)
on Jan 23, 2013 at 16:40 UTC ( #1014956=note: print w/replies, xml ) Need Help??

in reply to Do you hide .pl extension on web pages?

Wouldn't using a mod_rewrite in apache be the way to go with this?

That said, I know you can use it to redirect foo to foo.php, but I'm not sure if you can use it to hide .php

... or maybe you can? Take a look at:

map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
Tom Melly, pm (at) cursingmaggot (stop) co (stop) uk

Replies are listed 'Best First'.
Re^2: Do you hide .pl extension on web pages?
by jhourcle (Prior) on Jan 23, 2013 at 17:46 UTC

    If you do a rewrite of the URL (the [R] option), it will be shown to the client.

    If you proxy them ([P]), it won't.

    However, you could also use mod_negotiation's Multiviews so that when a URL comes in, it'll look for files with an extension if there isn't an extensionless version. The problem comes when you have both 'foo.php' and '' or 'foo.cgi', you might not have what you expected being served (without some extra effort to set the priorities)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014956]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-05-24 23:46 GMT
Find Nodes?
    Voting Booth?