[thelist] Enquiry handling

Dejan Kozina dejan at kozina.com
Sat Sep 3 06:56:44 CDT 2005


I'm not sure if this is what you're asking for, but it works on my 
server (putting it into the .htaccess file):

<FilesMatch "^p1$">
     SetHandler application/x-httpd-php
</FilesMatch>

This forces a file to be parsed by the PHP engine no matter the 
extension. You can use common regex patterns between the ^ and the $.

Another possibility (if mod_rewrite is installed):

RewriteEngine on
RewriteRule ^(.*)$ myphpscript.php?page=$1 [NC,L]

This would convert www.abcetc.co.uk/p1 into 
www.abcetc.co.uk/myphpscript.php?page=p1 transparently. I suppose it's 
safer to put this into a subfolder of its own, otherwise it would match 
requests for images and css files too...

djn

john at johnallsopp.co.uk wrote:
> Hi
> 
> For a client, I'm starting a marketing campaign. I want the enquiries
> from each activity .. an ad, a press release .. to go to different
> landing pages, but www.abcdefghijklmnop.co.uk/p1.php4 seems rather
> long.
> 
> Can I make www.abcdefghijklmnop.co.uk/p1 work? How?
> 
> J

-- 
Dejan Kozina
Dolina 346 (TS) - I-34018 Italy
tel./fax: +39 040 228 436 - cell.: +39 348 7355 225
http://www.kozina.com/  - e-mail: dejan at kozina.com


More information about the thelist mailing list