Textpattern clean urls with Lighttpd, the elegant way
I love this shit:
server.error-handler-404 = "/index.php"
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
server.error-handler-404 = "/index.php"
svn switch --relocate http://textpattern.com/svn/repos/current/textpattern http://svn.textpattern.com/current/textpattern
svn info | grep URL
URL: http://svn.textpattern.com/current/textpattern
<fieldset> <legend>Buy this product:</legend> <p>Our fine <txp:rei_show_custom /> is available for the low, low price of $<txp:rei_show_custom customid="2" />.</p> <p><label for="os0">What sort of <txp:rei_show_custom /> would you like?</label></p> <form action="https://www.paypal.com" method="post"> <p><input type="hidden" name="on0" value="variable" /><select name="os0" id="os0"> <option selected="selected" value="type1">Type 1</option> <option value="type2">Type 2</option> <option value="type2">Type 3</option> </select> </p> <p> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="business" value="yourbiz@yourdomain" /> <input type="hidden" name="item_name" value="<txp:rei_show_custom />" /> <input type="hidden" name="amount" value="<txp:rei_show_custom customid="2" />" /> <input type="image" id="add_to_cart" src="/path/to/your_cart_image" name="submit" alt="Add this item to your cart" /> <input type="hidden" name="add" value="1" /> </p> </form> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <p> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="business" value="yourbiz@yourdomain" /> <input type="image" id="view_cart" src="/path/to/your_view_cart_image.png" name="submit" alt="View all items currently in your cart" /> <input type="hidden" name="display" value="1" /> </p> </form> </fieldset>
URL='http://www.mysite.com/textpattern/' LOGIN='simplename' PASS='yourpassword' COOKIE=$(curl -s -D - -d "p_userid=$LOGIN&p_password=$PASS" \ $URL | head -n10 | sed -n 's/^Set\-Cookie\: //p') if [ -z $COOKIE ] then echo "Can't log in." exit 1 else echo "Cookie: "$COOKIE fi for file in $(ls -1|egrep '(gif)|(jpe?g)$') ; do echo "Sending "$file curl -s -H "Cookie: $COOKIE" -F "thefile=@$file" \ -F "event=image" -F "step=image_insert" $URL > /dev/null done
svn co http://svn.textpattern.com/current/ .
nano textpattern/config.php
svn update