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

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/$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
Replies are listed 'Best First'.
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 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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2015-11-30 09:08 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (767 votes), past polls