Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Clean URLs for non-TXP pages
I have a website (www.napostl.com) that uses TXP for most of its content management. A couple of pages, however, are generated by my own php pages which interact with a member database. I am wondering what might be the best way to have the urls of these pages (such as http://www.napostl.com/php/search_members.php) match the clean urls of TXP pages.
Can I somehow co-opt the system TXP uses for generating its clean urls (like http://www.napostl.com/about/welcome)? There must be more to it than the .htaccess?
The other possibility I thought of was to put my custom php in articles or pages in textpattern itself – would that be a bad idea for any reason? Or could I use an php include call to bring in my own php pages?
Many thanks for any advice.
Last edited by nabrown78 (2008-06-16 16:20:27)
Offline
Re: Clean URLs for non-TXP pages
Just thought I’d give this question one last shot…It seems like a problem that someone would have already solved, I just can’t find the solution.
Offline
#3 2008-06-16 18:49:30
- jelle
- Member
- Registered: 2006-06-07
- Posts: 165
Re: Clean URLs for non-TXP pages
hm…first of all I’m no expert but I do a fair amount of PHP and textpattern programming.
You should be able to incorporate your php into your TXP pages (there is even a <txp:php> tag!) ….can’t think of any reason why that would be a bad idea. If the original script is ok and without any security risk it’s ok I guess.
An alternative method would be loading your files/data dynamically with jQuery.
Offline
#4 2008-06-17 13:51:17
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Clean URLs for non-TXP pages
You could either use mod_rewrite to make your specific .php files appear to have no extension and be in folders that are not actually there.
Or, create the physical folders, move the files where appropriate, remove the PHP extension, and have PHP parse extensionless files.
The best method would depend upon how many files you’re talking about.
Offline
Pages: 1