Jump to content

FORBID RULE IF EVERYTHING FAILS


kruc3fix

Recommended Posts

Hi,

 

This is my first post in this forum and I would like to say HI to everyone!

 

I have this sandbox site http://www.bootsnall.com/frame/

 

HTTP login -

user: frame

password: 12

 

.. and basicaly all my links are like this:

http:/www.bootsnall.com/frame/index.php?frame_action=module/action

 

Placing a mod_rewrite rule like this one:

RewriteRule ^(.*)$ /frame/web/index.php?frame_action=$1 [QSA,L] 

will actualy change all my links to:

http:/www.bootsnall.com/frame/login.html

 

The question is: How do I forbid people from going to "index(.*)" pages ?

http:/www.bootsnall.com/frame/index.html

http:/www.bootsnall.com/frame/index.php

http:/www.bootsnall.com/frame/index.php?frame_action=module/action

http:/www.bootsnall.com/frame/index.php?haxxxx=true

.. etc....

 

I want the main page to only be accesible by going to

http:/www.bootsnall.com/frame

and not

http:/www.bootsnall.com/frame/index.html

or other variants and also I want people to use

http:/www.bootsnall.com/frame/page.html

and not

http:/www.bootsnall.com/frame/index.php?frame_action=module/page

 

A possible solution: - Can I do the following?

main rule: RewriteRule ^(.*)$ /frame/web/index.php?frame_action=$1 [QSA,L] [.. some end flag that will not let the next rule to be triggered ..]

second rule: [.. If the above rule does not apply than follow this rule ..]

Link to comment
https://forums.phpfreaks.com/topic/67745-forbid-rule-if-everything-fails/
Share on other sites

OOOOOOOOO I so want to help you, but I suck wiht mod_rewrite and that shit ...

Uh, set a file on index.html,phph and blah and set them to only be accessible if hte refferer was /frame ?  I only know how to do that in php though, sorry bud.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.