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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:40:50+00:00 2026-06-07T05:40:50+00:00

Currently my website images, css, js path is like this. It is very lengthy.

  • 0

Currently my website images, css, js path is like this. It is very lengthy. I want to hide some part of URL using .htaccess look into this example.

http://www.mysite.com/themes/global/css/style.css
http://www.mysite.com/themes/global/js/script.js
http://www.mysite.com/themes/global/images/logo.png
....

This is what I want without changing the current directory structure using .htaccess

http://www.mysite.com/css/style.css
http://www.mysite.com/js/script.js
http://www.mysite.com/images/logo.png
....

How can i do this? It is good to do or bad please comment. Thank you!!

  • 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-07T05:40:55+00:00Added an answer on June 7, 2026 at 5:40 am

    You can try something like this, first check if you’re accessing a css, js, or image, then rewrite the short URI to the full URI:

    RewriteEngine On
    RewriteCond %{REQUEST_URI} \.(css|js|jpe?g|gif|png|bmp)$
    RewriteCond %{REQUEST_URI} !^/themes/global/
    RewriteRule ^(.*) /themes/global/$1 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I like to refer images, css and php files using their absolute path, that
I'm currently developing a mobile website which is heavy on the images, css and
Im currently using 2 CSS style sheets with media queries attached for my website
I am a noob in ASP.NET and building a website currently... I want the
We currently have a website at somedomain.net/codefest. We do not own this server (or
I am currently rebuilding a website that uses a table layout and want it
Currently, I am modifying a css document to make a website compatible in IE
I'm designing my personal website at the moment and want to have images inside
So I've been wondering this for a while, I'm currently building a website which
I'm currently doing some redesign of a website, basically just upgrading it to a

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.