Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: From php to perl + template solution

by scorpio17 (Monsignor)
on Jul 14, 2010 at 14:00 UTC ( #849524=note: print w/ replies, xml ) Need Help??


in reply to Re^4: From php to perl + template solution
in thread From php to perl + template solution

I'd try something like this (untested):

# skip rule if item is an actual file or directory # (like images or stylesheets) RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)/?$ /cgi-bin/index.pl/$1 [L,QSA]

Your script can get the $1 parameter from $ENV{PATH_INFO}, and use that to determine which template file to use, etc.


Comment on Re^5: From php to perl + template solution
Download Code
Re^6: From php to perl + template solution
by Nik on Jul 14, 2010 at 15:07 UTC
    Thank you but for soem reason no matter 2 days now every mod_rewrite rule i try it just seem to NOT work.
    Fro example i try http://webville.gr/index.html to see if it will display the html print or redirect end every time it just display a hello i made. I dont know why.

    I do know though that .htaccess inside document root does get read because if i put random stuff in it and i try the above url it produces an internal server error

    Any clues?

      This is a Perl forum, mod_rewrite is an apache module. If as you say "every" rule you try doesn't work have you considered reading the documentation, any of the mod_rewrite tutorials which are online to try to work out what you are doing wrong?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-12-25 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (162 votes), past polls