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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:44:58+00:00 2026-05-20T10:44:58+00:00

if there is no index file in the folder how do i rewrite an

  • 0

if there is no index file in the folder how do i rewrite an index file from another folder…so for example the main site has two folders like this

main_folder/no index.php
folder1/index.php
folder2/index.php

what do i have to put in the rewrite rule to make the main page show the index for folder1/index.php

EDIT

got it working with this

RewriteEngine On
RewriteCond %{HTTP_HOST} site.com
RewriteCond %{REQUEST_URI} !folder1/
RewriteRule ^(.*)$ folder1/$1 [L]
  • 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-20T10:44:59+00:00Added an answer on May 20, 2026 at 10:44 am

    Try this:

    #in the .htaccess file where there is no exit or in root
    Options Indexes #if still fails delete this line
    DirectoryIndex /folder1/index.php
    

    Not sure though

    edit: for sub levels maybe adding this solves.

    RewriteCond %{REQUEST_URI} ^/folder1/
    RewriteRule ^(.*)$ http://www.example.org/$1 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have folder home/admin. In this folder there is index.php. When i access to
Here is the scenario: There is a index.php file in root folder some files
In a folder named rewrite I have two files, .htaccess and index.php <rewrite> -
If I have three files index.php file.php and fns.php First example (it works): index.php
Iam making an app which has one index.php file. I also have these other
On my web site, there is an index page, but if I take out
There is a rewrite rule ensuring that all URL's head to index.php and maintain
I have installed my website in a subfolder www.server.com/folder/index.php Is there any way to
Let's say, on a ColdFusion site, that the user has navigated to http://www.example.com/sub1/ The
So just a general question: if i have a file structure like this where

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.