Clean URLs in Textpattern
I hear a lot of people are having problems using Clean URLs in Textpattern, and I myself keep running into the same problem everytime I reinstall the software to use. These are the steps I take to get them to work.
My .htaccess file:
RewriteRule ^(about|article|archive)(.*)$ /index.php?s=$1&rwtxpp=$2 [PT,QSA]
- Download this code: /code/cleanurls_htaccess.txt
Of course you will have to change the section names to match yours.
My index.php file:
if (!empty($_GET['rwtxpp'])) $_SERVER['PATH_INFO'] = $_GET['rwtxpp'];
- Download this code: /code/cleanurls_phpcode.txt
You should continue to create the sections files that TXP asks you to make when you make a new section, but when it asks for you to add those lines to the .htaccess file, simply add the name of your section into the .htaccess file (as shown above) inbetween the brackets.