LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Rewrite. Again :)

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2007, 06:54 AM
[/root.] [/root.] is offline
Member
 
Join Date: Apr 2007
Posts: 14
Default Rewrite. Again :)

Quote:
RewriteEngine On

# registered user files
RewriteRule ^files/(([a-z0-9_]+)/)?([0-9]+)_([a-z0-9]+)/.* getfile.php?action=$2&file_id=$3&file_key=$4 [L,NC,QSA]
RewriteRule ^thumbs/(large|small|square)/([0-9]+)_([a-z0-9]+)/.* getfile.php?action=thumb&size=$1&file_id=$2&file_k ey=$3 [L,NC,QSA]
RewriteRule ^view/((full)/)?([0-9]+)_([a-z0-9]+)$ view.php?action=$2&file_id=$3&file_key=$4 [L,NC,QSA]

# Public files
RewriteRule ^public/((browse|viewset|manage|slideshow)/?)?(([a-z0-9]+)\_)?([0-9]+)?/?$ public.php?action=$2&upload_key=$4&upload_id=$5 [L,NC,QSA]
RewriteRule ^public/view/((full)/)?([0-9]+)/?$ pview.php?action=$2&file_id=$3 [L,NC,QSA]
RewriteRule ^pfiles/(([a-z0-9_]+)/)?([0-9]+)/.* pfile.php?action=$2&file_id=$3 [L,NC,QSA]
RewriteRule ^pthumbs/(large|small|square)/([0-9]+)/.* pfile.php?action=thumb&size=$1&file_id=$2 [L,NC,QSA]

# User links
RewriteRule ^/*browse/+([a-z0-9_]+)/?(/([0-9]+)_?([a-z0-9]*)(/page([0-9]+))?)?/?$ browse.php?action=browse&username=$1&folder_id=$3& folder_key=$4&page=$6 [L,NC,QSA]
RewriteRule ^/*info/+([a-z0-9_]+)/?$ browse.php?action=info&username=$1 [L,NC,QSA]
RewriteRule ^/*pm/+([a-z0-9_]+)/?$ usercp.php?action=sendpm&username=$1 [L,NC,QSA]

# Rules for making links cleaner.
RewriteRule ^/*(public|folders|usercp|account|myfiles|upload|sli deshow|comment|contacts|announcements)/?$ $1.php [L,NC,QSA]
RewriteRule ^/*slideshow/([0-9]+)(_([a-z0-9]+))?$ slideshow.php?folder_id=$1&folder_key=$3 [L,NC,QSA]
RewriteRule ^register/?$ account.php?action=register [L,NC,QSA]
RewriteRule ^login/?$ account.php?action=login [L,NC,QSA]

RewriteRule ^members/?$ browse.php [L,NC,QSA]
RewriteRule ^members/page([0-9]+)/?$ browse.php?page=$1 [L,NC,QSA]
RewriteRule ^members/public/?(page([0-9]+))?/?$ browse.php?public=1&page=$2 [L,NC,QSA]
RewriteRule ^members/info/([0-9]+)$ browse.php?action=info&userid=$1 [L,NC,QSA]
RewriteRule ^members/browse/([0-9]+)/?(/.+)?$ browse.php?action=browse&userid=$1&folder=$2 [L,NC,QSA]
RewriteRule ^contacts/(add|delete|edit)/([a-z0-9_]+)$ contacts.php?action=$1&username=$2&use=username [L,NC,QSA]
Should i change here something or LiteSpeed proccess those rules without changes?
Reply With Quote
  #2  
Old 04-22-2007, 11:46 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
There is no need to to change if you use it in a .htaccess, if use those under a vhost rewrite tab, you need to add "^/*" prefix like some of the rules in your post.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:45 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.