Results 1 to 9 of 9
Thread: PURL scripts
-
11-04-2011, 01:14 PM #1Junior Guru Wannabe
- Join Date
- Feb 2008
- Posts
- 39
PURL scripts
I was wondering if anybody knew of any good resources for PURL creation and scripts? or point me to a forum post on the subject?
Thanks!
-
11-04-2011, 01:20 PM #2
Perhaps you mean PERL (Practical Extraction and Reporting Language)?
You could start here: http://www.google.com/search?q=perl+...2&spell=1&sa=XYour one stop shop for decentralization
-
11-04-2011, 01:21 PM #3Junior Guru Wannabe
- Join Date
- Feb 2008
- Posts
- 39
Thanks for the response but I actually meant PURL http://en.wikipedia.org/wiki/Persist...source_Locator
I also did a google search for PURL but only found companies that offer the software/services for sale and I was hoping to find an open
source solution or some helpful scripts to get me going.
Thanks!
-
11-04-2011, 01:31 PM #4
Ah, thanks.
Try this instead?
http://www.google.com/search?complet...e+Search&gbv=2Your one stop shop for decentralization
-
11-04-2011, 01:39 PM #5Junior Guru Wannabe
- Join Date
- Feb 2008
- Posts
- 39
Thanks again, but unfortunately that search was not helpful either. I just want to learn how to make PURLS in php server side. Its being used for a marketing campaign.
-
11-06-2011, 01:09 PM #6Newbie
- Join Date
- Nov 2011
- Posts
- 29
Your Wikipedia reference links to Persistent URLs - these are simply HTTP status codes coupled with a URL. An example of implemented a 301 redirect (permanently moved) would be:
Code:<?php header( "HTTP/1.1 301 Moved Permanently" ); header( "Location: http://www.new-url.com" ); ?>
To create these types of PURLs (such as Username.Domain.com) you will need to setup wildcard subdomains in the DNS records (looks like *.domain.com) and then setup all subdomains to route to a specific PHP script for handling. This can be easily done using mod_rewrite in Apache via .htaccess. Note that most shared hosts do not allow wildcard subdomains.
-
11-06-2011, 01:16 PM #7Junior Guru Wannabe
- Join Date
- Feb 2008
- Posts
- 39
Thanks for the reply that has been helpful!
Yes I meant Personalized URLS, do you know of a tutorial or source that shows you the steps to set this up? We own our server so we have access to try this.
-
11-06-2011, 01:59 PM #8Newbie
- Join Date
- Nov 2011
- Posts
- 29
I don't know of any great tutorials so here's a quick write-up.
Basic steps for setting up a Wildcard subdomain (assuming a LAMP stack):
1) DNS Record
Add a DNS record, here are the settings:
Type: "A" Record (More information on DNS record types)
Name: *.DOMAINNAME.TLD
Content: IP Address of your Server
TTL: 300 (300 typically works well for me)
2) Setup/Modify the Apache Virtual Host
On the ServerAlias config line add *.DOMAINNAAME.TLD. It should roughly look something like:
Code:<VirtualHost *:80> ServerName DOMAINNAME.TLD ServerAlias *.DOMAINNAME.TLD ... </VirtualHost>
In your directory specified in the VirtualHost add a file called .htaccess. Mine looks something similar to:
Code:RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L]
4) Write your Personalized PHP script
Which ever file you redirect to in .htaccess will need to begin the process of analyzing the $_SERVER array to determine what to display to the user.
-
11-17-2011, 12:49 PM #9Junior Guru Wannabe
- Join Date
- Feb 2008
- Posts
- 39
@webstartavenue Thank you for this! This is actually very helpful and gets me in the right direction.
Similar Threads
-
Scriptalicious Holiday Discount - 30% Off SEO Scripts, AJAX Scripts & More!
By Tekime in forum Software & Scripts OffersReplies: 2Last Post: 12-18-2009, 01:59 AM -
Web Scripts Directory : Search-Scripts.com Review Requested
By Chadha in forum Web Site ReviewsReplies: 7Last Post: 08-08-2007, 05:28 AM -
Iframe Scripts. Scripts easy to include to your web design
By lasse in forum Other Offers & RequestsReplies: 0Last Post: 10-14-2006, 08:12 AM -
Iframe Scripts. Scripts easy to include to your web design
By lasse in forum Design OffersReplies: 0Last Post: 10-01-2006, 06:37 AM -
50% Off All PHP Scripts (WHT only): Hosting Directory Script, Order Form Scripts +
By adscas77 in forum Other Offers & RequestsReplies: 10Last Post: 05-27-2005, 11:44 AM