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

  • Home
  • SEARCH
  • 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 7826629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:30:09+00:00 2026-06-02T09:30:09+00:00

I am creating php front controller. this is my .htaccess file. <IfModule mod_rewrite.c> RewriteEngine

  • 0

I am creating php front controller. this is my .htaccess file.

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    (.*) controller.php    [L]
</IfModule>

This code redirect all url to the controller.php. I need to avoid redirect index.php to the controller.php. All other urls should redirect to the controller.php.

  • 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-06-02T09:30:12+00:00Added an answer on June 2, 2026 at 9:30 am

    You can use the following syntax to make an exception:

    RewriteRule name_of_page_to_exclude.php - [L]
    

    The dash (-) is important. The [L] makes sure that if this rule is triggered, it’s the last one that will be processed. So naturally, you’ll need to place it near the top of your .htaccess file, before the rule in your question:

    RewriteEngine on
    RewriteRule name_of_page_to_exclude.php - [L]
    RewriteRule (.*) controller.php [L]
    

    The documentation has the following to say:

    – (dash)
    A dash indicates that no substitution should be performed (the existing path is passed through untouched).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I am reading the following article on a lightweight PHP dynamic front controller:
All, I'd like to understand I'm looking at this code sample from w3Style's front
I am creating site with php. On localhost all works well. On my hosting
I'm using this php class ( http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php ) for creating the different sized images
i am creating rss reader application with php.it is basicly getting rss url's from
I am creating an image via a php script using imagepng. This works fine
I have some php code that is creating an html table. Within it I
I am creating a PHP session using the following code: <?php session_start(); $_SESSION['loggedin'] =
what i want to do is that i am creating php array dynamic .i
I am creating a php backup script that will dump everything from a database

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.