Apache Server configuration support - htaccess rule help

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > December 2007 > htaccess rule help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author htaccess rule help
Byru

2007-12-17, 1:32 pm

Hi,

I have got the following htaccess rule:

-----------------------------------------
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . sts/index.php [L,NS]

AddDefaultCharset UTF-8
----------------------------------------

My website uses links like this:

http://webaddr/sts/section/page/

The /section/ part is simply a html document named section.html.
Ii is supposed to be called only by http://webaddr/sts/section/* and not
directly.

The php script controls the links and includes specific files if they exist
e.t.c.
I would like to block all possibilities of accessing files directly so for
instance the call like this:
http://webaddr/sts/section.html will redirect to http://webaddr/sts/section/
or to any other specified location like http://webaddr/sts/home/
I would also want to preserve the possibility of calling certain files
(specified in a list) normally - directly.

Can you help me with modifying my rule to allow this?
TiA
B.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com