Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.