Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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: http://stackoverflow.com/questions/1992183/how-to-hide-the-html-extension-with-apache-mod-rewrite

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


Comment on Re: Do you hide .pl extension on web pages?
Download Code
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 'foo.pl' or 'foo.cgi', you might not have what you expected being served (without some extra effort to set the priorities)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014956]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-04-19 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls