Home: Perl Programming Help: Beginner:
hidding the URL RSVP.pl



markaa
New User

May 10, 2017, 9:54 PM


Views: 1412
hidding the URL RSVP.pl

after my script runs the url on top looks like this www.name.com/cgi-bin/RSVP.pl. how can I make it look like this www.name.com or www.name.com/Confirmation

I try working with the .htaccess file but I'm new at this and I keep gettin a 500 error.

Thanks in advance


Laurent_R
Veteran / Moderator

May 11, 2017, 4:03 AM


Views: 1402
Re: [markaa] hidding the URL RSVP.pl

We don't have a crystal ball, we can't help you if you don't see our script. Please show your script.


markaa
New User

May 11, 2017, 7:27 AM


Views: 1399
Re: [Laurent_R] hidding the URL RSVP.pl

This is the code in the perl which is working and printing to the screen but end up with the RSVP.pl url

## Display the HTML file
print "content-type: text/html\n\n";
print <<EndOfHTML;
<html>


in the .htaccess file I have the following code

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.pl [NC,L,R=301]
</IfModule>

also tryed this

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^confirmation([a-zA-Z0-9_-]+)$ cgi-bin\
</IfModule>

Thanks,

Mark