Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin Forgot Password Register  
 
 
Page Index Toggle Pages: 1
Send Topic Print
use htaccess and mod rewrite (Read 1567 times)
Reply #2 - Mar 24th, 2010 at 3:08pm

webgid   Offline
YaBB Newbies
Stalin Love Perl and YaBB!
...
Rus

Posts: 25
*
 
for simple tasks can use the service Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register - my blog
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register - I Love Linux !!!
IP Logged
 
Reply #1 - Mar 24th, 2010 at 12:40pm

Help Me With Perl   Offline
YaBB Administrator
I love Perl and YaBB!
The Land of Perl / YaBB

Posts: 160
*****
 
you can read more about it here

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register)


Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
 

helpmewithperl Administrator.
IP Logged
 
Mar 22nd, 2010 at 1:00pm

webgid   Offline
YaBB Newbies
Stalin Love Perl and YaBB!
...
Rus

Posts: 25
*
 
URLs can be made much more pleasant for users, so and for search engines. So why not take advantage.
Htaccess (Check with your host, whether it is enabled ..)


1)
start will create in the root folder of the script file .htaccess (usually Windows NT 'swears' so it is best to use the editor for example Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register )

2)
you can assign a convenience to home page
Code:
####### Индексная страница (Index page) ########
DirectoryIndex shared.php 



3)
  disable error php
Code:
####### Отключить ошибки php (Disable error php) #############
php_flag display_errors off
php_flag display_startup_errors off 



4)
designate an error page/ create file 403.html for error page
Code:
###### Страницы ошибок (403) #########
ErrorDocument 403 http://www.site.ru/403.html 



5)
turn on mod rewrite

Code:
####### ЧПУ - mod rewrite (enable mod) #########
RewriteEngine On

##### статичные страницы (static page) ########
RewriteRule ^user/$ /shared.php [L]
RewriteRule ^register/$ /register.php [L]

##### динамические страницы (dinamic page) ########
RewriteRule ^logout/$   /?logout=1 [L]
RewriteRule ^user/([^/]*)/$ /shared.php?user=$1 [L]
RewriteRule ^user/([^/]*)/([^/]*)/([^/]*)$ /shared.php?expand=$3&folderid=$2&user=$1 [L] 



respectively swap links
here for example

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register changes to
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

&

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register changes to
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

&

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register changes to
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

All these links should be changed in the script file, all of this rather cumbersome
so if you still on my advice use notepad + + then use the menu :
Search--> Find in files
  [settings specify what to look for and what to replace]

6)
prohibit watch directories and subdirectories
Code:
##### запрещаем смотреть каталоги #######
Options All -Indexes 



7)
acquaintance recommended for protection
how it helps - I do not know /  hope Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register comment on ..

Code:
########### hack s #########
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L] 




8)
If you have any suggestions or you see an error, please write about it.
Thank you for your attention

« Last Edit: Mar 23rd, 2010 at 2:15am by webgid »  

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register - my blog
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register - I Love Linux !!!
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print