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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:13:51+00:00 2026-05-22T12:13:51+00:00

Recently I solved my issue with mod_rewrite to redirect a domain to a subfolder.

  • 0

Recently I solved my issue with mod_rewrite to redirect a domain to a subfolder. Now that I’ve fixed my original issue, I’ve hit a another wall.

Here is an example structure:

/
/index.php
/content/
/content/styles.css
/domain/
/domain/index.php

For simplicity, /domain/ is the current and top-most folder. In /domain/index.php I am trying to access /content/styles.css. How can I accomplish this? Assume there is no web link to the previous directories. Also ../ does not work as ../ returns the same directory as ./.

I thought of a way, but my .htaccess skills aren’t very strong and I don’t want to spend hours or days piecing together an answer. Let’s say I have:

<link rel="stylesheet" type="text/css" href="content/styles.css" />

If I am right, href performs a request for the file. How can I use .htaccess to capture the request and point it to the correct folder? Like if the query string looks like ^/content/(.*)$, and rewrite it back one directory to access ../content instead.

Hopefully this made some type of sense.

  • 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-22T12:13:52+00:00Added an answer on May 22, 2026 at 12:13 pm

    You could create a dummy /domain/content directory with another .htaccess file which has something like

    RewriteRule ^([^/]+)$ /content/$1 [NC,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently ran into an issue that could easily be solved using modulus division,
With the help of this community, I just recently solved some issues with PHPExcel
Sometimes I have come across this issue that whenever I change the order of
I recently upgraded my web server to Windows 2003 R2 Enterprise 64 Bit. Now
I have recently stumbled across an issue where the WPF ListView control seems to
Recently, I was discussing with another programmer the best way to refactor a huge(1000
Recently, my friend helped me fix a background overlay problem. I had an issue
I was trying to solve this issue recently, but i don't really know how.
I recently came across this error in IE9 that says :- The maximum number
So recently I have been working on phonebook project that uses Binary Search Tree.

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.