|
#1
|
|||
|
|||
Hi i am trying to rewrite my htaccess files with not much luck in finding documentation to help me do it. Here is the htaccess files. I'd love some pointers in the right direction
Code:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]
AddType text/x-component .htc
<FilesMatch "\.(htc)$">
SetHandler text/x-component
</FilesMatch>
![]() Code:
location ~ /\. {
deny all;}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
break;
}
|
|
#2
|
|||
|
|||
You are right, if you added those rules it would work just fine.
Just one thing, we do care about the security of all of our customers in our servers, our master Nginx config, we have a predefined set of rules for all VirtualHosts, and one of them is to block any access to the outside of any .ht* files, so really, you shouldn't have to worry about it in your rewrite rules as its already in the master config. Code:
location ~* /\. {
deny all;
}
Code:
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
|
|
#3
|
|||
|
|||
Thanks for the quick help! I have made changes you recomended. This is my last one that i dont really know where to start on. the htaccess file is:
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)|(\.swf)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
|
|
#4
|
|||
|
|||
|
#5
|
|||
|
|||
we do care about the security of all of our customers in our servers, our master Nginx config, we have a predefined set of rules for all VirtualHosts, and one of them is to block any access to the outside of any .ht* files, so really, you shouldn't have to worry about it in your rewrite rules as its already in the master config.
_________________________________ HOW TO BE A REAL ESTATE MILLIONAIRE NOW FREE RBCExpressTerm Quote for Florida, Texas and Tennessee Residents |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT. The time now is 06:48 PM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.







Linear Mode
