mode rewrite url

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
lilliput
Posts: 3
Joined: Tue May 10, 2005 3:25 am

mode rewrite url

Post by lilliput »

A lot of people offer their rewriterules so ..
I'll give mine

the order is important.

Code: Select all

RewriteEngine On
RewriteRule ^article/([0-9]+)/xml/(.*)\.xml /xml/$2\.xml
RewriteRule ^article/([0-9]+)/pdf/(.*)\.pdf /pdf/$2\.pdf
RewriteRule ^article/([0-9]+)/([0-9]+)-(en|fr)\.html$ /index.php?action=artikel&cat=$1&id=$2&artlang=$3 [L]
RewriteRule ^article/([0-9]+)/([0-9]+)-(en|fr)\.pdf   /pdf.php?id=$2&lang=$3
RewriteRule ^article/([0-9]+)/([0-9]+)-(en|fr)\.xml   /index.php?action=xml&id=$2&artlang=$3
RewriteRule ^article/([0-9]+)/([0-9]+)-(en|fr)/send\.html$ /index.php?action=send2friend&cat=$1&id=$2&artlang=$3
RewriteRule ^article/([0-9]+)/([0-9]+)-(en|fr)/comment\.html  /index.php?action=writecomment&cat=$1&id=$2&artlang=$3
RewriteRule ^article/([0-9]+)/ /index.php?action=show&cat=$1
RewriteRule ^article/ /index.php?action=show
RewriteRule ^contact/ /index.php?action=contact
RewriteRule ^question/ /index.php?action=ask
RewriteRule ^search/ /index.php?action=search
I didn't change the code yet but will be by tomorrow finishing some testing.


NB there is some hack with some external script. If you want the sources mail me through contact on my website.
NB2: I remove the version of phpmyfaq on my website for security reason: If a SQL injection is discovered, a simple script that get answer from google will launch automatic attack on all the website.
Thorsten
Posts: 15805
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

phpMyFAQ 1.5 already supports mod_rewrite.

I'll write you a mail!

thanks and bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
lilliput
Posts: 3
Joined: Tue May 10, 2005 3:25 am

Post by lilliput »

I got your mail ;)

The version I used is mainly based on an october/november version (should be 1.4)

I integrate different other php script
1 bookmark
2 sendmessage to jabber ( the one you used - amessage script)
3 php script to browse the directory (really clean)
4 I will integrate soon a script to browse pictures
5 I manage to use a slideshow and try to integrate it on phpmyfaq.
( I got almost the css finished but it's not integrated with phpmyfaq)
http://www.saycure.com/upload/project/presentation/ + a php script to generate the pictures tags (I was getting creasy to copy and paste the code.)

I did not try the 1.5 because I am afraid to recode everything.
(I maybe try to test it )

I wish to get a rss/atom/rdf for the news and 10 last articles would be great ;)

thanks for your time, your code is really clear and clean :) I really like it
Thorsten
Posts: 15805
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
lilliput wrote: I integrate different other php script
1 bookmark
2 sendmessage to jabber ( the one you used - amessage script)
3 php script to browse the directory (really clean)
4 I will integrate soon a script to browse pictures
5 I manage to use a slideshow and try to integrate it on phpmyfaq.
( I got almost the css finished but it's not integrated with phpmyfaq)
http://www.saycure.com/upload/project/presentation/ + a php script to generate the pictures tags (I was getting creasy to copy and paste the code.)
This sounds great.
lilliput wrote:I wish to get a rss/atom/rdf for the news and 10 last articles would be great ;)
phpMyFAQ 1.4 supports this, phpMyFAQ 1.5 has live feeds for News, Top10 and the latest articles.
lilliput wrote:thanks for your time, your code is really clear and clean :) I really like it
Thanks for using it!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply