Note that there are some explanatory texts on larger screens.

plurals
  1. POBlock webpages which are only used for dynamic content retrieval through AJAX. (.htaccess?)
    primarykey
    data
    text
    <p>I would like to know if it's possible to make pages invisible for users with .htaccess or something else.</p> <p>Some background info and some other questions : </p> <p>I'm building a web application which does a lot of dynamic content loading. At the moment i'm just doing ajax calls on a ajax.php file and i give a POST parameter with the name : action. Depening on this action I call a method of a class, this class then echo's JSON or HTML.</p> <p>But i'm starting to get at the point, that i have functions who return almost a complete html page (SQL and php in between) which kinda looks dirty. Is it a better option to build seperate .php pages for this content, and then load the content just from that page? (I use Jquery, so that would be the .load function as call back)</p> <p>The problems i see with this method is that people can find those .php pages and access them, and then see information that's not relevant and has no lay out or something. So i want to block these pages. How do I do this with .htaccess?</p> <p>Now if u think i'm doing stuff completely wrong, just tell. A basic situation in my implementation : Fill in a client number in a search form -> press enter -> ajax call with post parameters action : getclientinfo , id : the value in the field -> ajax.php gets the correct class and method -> .class.php executes his method and checks if the input is ok, if so it constructs a page with content from the database -> All this gets returned as JSON something like : </p> <p>{ success : OK; content : the complete content }</p> <p>-> then with jquery i check the success boolean, and then load the complete content into the current page.</p> <p>Is this a good method, or am i doing things bad ? The thing i'm not feeling myself ok with, is the ajax.php page. What's usually done ?</p> <p>Thanks in advance. I got many answers from this website, first time ever I'm asking one myself.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload