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 9315983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:30:09+00:00 2026-06-19T02:30:09+00:00

Hopefully this is a simple one. I have a really basic .htaccess that rewrites

  • 0

Hopefully this is a simple one. I have a really basic .htaccess that rewrites any request to /admin (or /admin/etc) to /_admin/index.php. So far so good:

#Options All -Indexes

RewriteEngine On
RewriteBase /admin

RewriteRule ^admin/$ /_admin/index.php [QSA]
RewriteRule ^admin$ /_admin/index.php [QSA]
RewriteRule ^admin/(.+)$ /_admin/index.php [QSA]

What I also want is a generic “catch all else” rule that rewrites any other url (/users, /turnips/, /some/other/path and so forth) back to /index.php

I can’t seem to get that to work – its either server error 500‘s or /admin also gets rewritten to the root page. I’m sure I just need to do something with RewriteCond but I can’t figure it out.

Thanks!

  • 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-19T02:30:10+00:00Added an answer on June 19, 2026 at 2:30 am

    Add this after the other rules. It would be the default rule if the previous rules are not applied.

    RewriteBase /
    RewriteCond %{REQUEST_URI} !index\.php [NC]
    RewriteRule .*        index.php        [L,QSA]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This will hopefully be a simple one: I have a div I want to
Hopefully this should be a simple one for anyone who understands COM. I have
Hopefully this is a simple one. I have a table of sent messages and
Hopefully this will be one of those simple answers that is so simple they
Hoping this is a simple one. I have a very simple issue here that
This should hopefully be a simple one. When using a date time picker in
Hopefully this is simple: I have a relatively long list where each list item
New to MVC, so hopefully this will be pretty simple. I have an HTML
hopefully a pretty simple question this time. I have a Select method in a
This is hopefully a simple question: I have an OpenGL texture and would like

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.