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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:21:31+00:00 2026-06-12T04:21:31+00:00

I have tinycms application and how could I forward all traffic to document root?

  • 0

I have tinycms application and how could I forward all traffic to document root?

Example:

http://<IP-address>/ADFADSF/adsfadsf --> /
http://domain.com/adsf --> /

Currently, I have this in my .htaccess

<Files .htaccess>
order allow,deny
deny from all
</Files>
Options +FollowSymLinks
RewriteRule admin/$ index.php?view=admin [QSA]
Options -Indexes

Thanks.
James

  • 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-12T04:21:32+00:00Added an answer on June 12, 2026 at 4:21 am

    Using mod_rewrite:

    RewriteRule ^/?.+$ / [L,R]
    

    Using mod_alias:

    RedirectMatch ^/.+ /
    

    This will,m of course, render the RewriteRule admin/$ index.php?view=admin [QSA] rule useless, or at the very least, cause some conflicts. So you should either comment that rule out, or create a special exception where all traffic except admin/ gets redirected.


    EDIT:

    How Im gonna do that to make an rule except admin/ ?

    Here’s one way to do it, I’m only guessing that this is the behavior you want. This stuff does not change, it’s fine the way it is:

    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>
    Options +FollowSymLinks -Indexes
    

    Add a:

    RewriteEngine On
    

    Then:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !^/(index\.php|admin)
    RewriteRule ^/?.+$ / [L,R]
    
    RewriteRule admin/$ index.php?view=admin [QSA,L]
    

    So putting all that together, you have the deny for accessing .htaccess files. Then you have your Options, then your rewrite rules. You need to turn the RewriteEngine on, then redirect any request that isn’t /index.php or /admin, then internally rewrite /admin to /index.php.

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

Sidebar

Related Questions

have 2 questions : A computer with 32-bit address uses 2-level page table (9
Have a SQL problem, adding this model all works correctly, the problem is in
Have someone a Url or some example of how to create custom Rules for
Have a rather abstract question for you all. I'm looking at getting involved in
Have a look at this url: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jquery_ui_methods#column_chooser I have got the Column Chooser dialog
have on question about the Zend Framework 2. In my Application i have a
Have some runtime defined schedule for one week, for example: <schedule> <s day=Monday, time=1:00:00></s>
Have a look at the menu link Produkter on http://marckmann.se/ I would like to
Have a numeric nvarchar values with some extra-symbols For example 1/2, 9/6, 14A They
Have you ever seen any of there error messages? -- SQL Server 2000 Could

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.