Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6717109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:48:49+00:00 2026-05-26T08:48:49+00:00

I have a bootstrap file which is index.php and I only allow this page

  • 0

I have a bootstrap file which is index.php and I only allow this page to be called by people not other ones.

I’ve come up with the code below and I received an Internal 500 error. I like to show the log files but I cannot since I am running this on the shared hosting but what I know is it is CGI mode.

I put that code in .htaccessand received error and put it in php.ini and didn’t work.

<File /index.php>
  Allow from all
  Require None
  Satisfy Any
</File>

What’s I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:48:50+00:00Added an answer on May 26, 2026 at 8:48 am

    What I do is just redirect all requests to the index.php file and let the index file handle any bad requests, since it already handles all the friendly URL requests and everything. This way you don’t really need extra code in the index file. It will run normally and see ‘somefile.php’ and the page they’re trying to open and determine that this is not a valid page to be opening and error out like any other invalid path, at least it would for the way mine is set up.

    RewriteEngine On
    RewriteBase /
    RewriteRule .* index.php [L]
    

    You would have to exclude any images or CSS folders if you don’t use sub-domains for them like I do, or you can process them with the index file as well.

    Example for excluding images and css folders:

    RewriteRule !^(images|css)/.* index.php [L]
    

    Or if you don’t want to do that, you could send all the disallowed files to -.

    RewriteRule !^(index\.php|images/.*|css/.*) - [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my bootstrap.php I have the following: if($_SERVER['SERVER_NAME'] == 'localhost') Kohana::$environment = 'development'; else
I'm new to doctrine. I created an bootstrap file like the following one: require_once(dirname(__FILE__)./../conf/general.php);
I'm writing a php script which will enable people to change the theme of
I have a camel route file which I want to populate/configure based on certain
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have a working JNLP application which I need to distribute to various non-technical
(I hope 'bootstrap' is the correct term...) I have a Symfony 1.4 project in
I am new to object php, I have the following concern: is it possible
I am looking at Yahoo's YUI compressor executable jar and they have this class,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.