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

The Archive Base Latest Questions

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

Here is my code: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond application/public/%{REQUEST_FILENAME} -f RewriteRule (.*) application/public/$1 [L]

  • 0

Here is my code:

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond application/public/%{REQUEST_FILENAME} -f 
RewriteRule (.*) application/public/$1 [L]

I want to make expression:

  • If file {REQUEST_FILENAME} doesn’t exist AND if file application/public/%{REQUEST_FILENAME} exists do rewrite

Example results:

  • /style.css = /application/public/style.css
  • /gfx/logo.png = /application/public/gfx/logo.png
  • /index.php = /index.php
  • /Welcome = /index.php?input=Welcome (it’s working)

What is proper code for this expression? I think i need to change line:

RewriteCond application/public/%{REQUEST_FILENAME} -f 

But i have no bloody idea how…

Full .htaccess listing:

RewriteEngine on

RewriteRule style,(.+).css tmp/merged/css,$1 [L,QSA]
RewriteRule script,(.+).js tmp/merged/js,$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond application/public/%{REQUEST_FILENAME} -f 
RewriteRule (.*) application/public/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule (.*) index.php?input=$1 [L,QSA]

(sorry for my english)

  • 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:55:17+00:00Added an answer on May 26, 2026 at 8:55 am

    i’ve found small workaround, but it’s not elegant solution 🙁

    RewriteEngine on
    
    # Access to files in ./application/public
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule (.*) application/public/$1 [DPI]
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule application/public/(.*) $1 [DPI]
    
    # Main rewrite
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule (.*) index.php?input=$1 [L,QSA,DPI] 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my rewrite code: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}
I've recently added this little bit of code to my .htaccess file: RewriteCond %{REQUEST_FILENAME}
Here is code: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_URI} !^/rt/ RewriteRule ^(.*)$ /rt/$1 [L]
Here is my current code: RewriteCond %{HTTP_HOST} !^example\.com [NC] #RewriteCond %{REQUEST_URI}!^something RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com
Here a code to demonstrate an annoying problem: class A { public: A(): m_b(1),
here is code for regular expression matching #include<iostream> #include<stdio.h> #include<string.h> using namespace std; int
Here is code example class A{ int i; public: A(int i) : i(i) {}
enter code here Hi All, I have a simple windows service application that connects
here is my .htaccess file, it works because the first rewriterule correctly redirects .html
Here is the code I have currently in my .htaccess file: Options +FollowSymLinks RewriteEngine

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.