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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:49:50+00:00 2026-06-14T01:49:50+00:00

I am using apache’s mod_rewrite module to improve my URL structure(for one instance- www.mydomainname.com/user.php?u=somename

  • 0

I am using apache’s mod_rewrite module to improve my URL structure(for one instance- www.mydomainname.com/user.php?u=somename) to some fancy URL like www.mydomainname.com/user/somename . I have successfully achieved it until I got into this very bad situation of CSS and JS relative path issue.
Whenever I open up www.mydomainname.com/user/somename, it loads successfully without CSS and JS with only text and basic HTML. I used chrome’s “inspect element” feature, which help me to know the following errors that occurred.

GET http://www.mydomainname.com/user/css/style.css 404 (Not Found) somename:5
GET http://www.mydomainname.com/user/css/developer.css 404 (Not Found) somename:6
GET http://www.mydomainname.com/user/js/jquery-1.5.2.js 404 (Not Found) somename:7
GET http://www.mydomainname.com/user/js/jquery.form.js 404 (Not Found) somename:5

The .htaccess file has following contents-

DirectoryIndex index.html.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule    ^user/([^/.]+)/?$    user.php?u=$1    [L]

The user.php is residing in the parent folder as well as the CSS and JS folders. I got to know the cause but do not know how to remove the errors.

EDIT: The path of CSS and JS given in the user.php file are-

<link type = "text/css" rel = "stylesheet" href = "css/style.css">
<link type = "text/css" rel = "stylesheet" href = "css/developer.css">
<script type="text/javascript" src="js/jquery-1.5.2.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
  • 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-14T01:49:51+00:00Added an answer on June 14, 2026 at 1:49 am

    Try adding absolute paths (just add / at the beginning of the URL):

    <link type = "text/css" rel = "stylesheet" href = "/css/style.css">
    <link type = "text/css" rel = "stylesheet" href = "/css/developer.css">
    <script type="text/javascript" src="/js/jquery-1.5.2.js"></script>
    <script type="text/javascript" src="/js/jquery.form.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Apache 2.2 and PHP 5, what's the best way to run PHP without
I am using Apache Solr for one of my Drupal sites. I start my
I am using Apache Thrift to communicate between a Java program and a PHP
I am using apache solr search integration on my Drupal 6 website: govoluntourism.com .
i am using apache fop 1.0 to create some pdfs for customers for one
Using Apache and mod_rewrite I can rewrite a complex request to a simple filename,
I'm using Apache 2.2 and PHP 5.3.8. How should I configure .htaccess to redirect
i'm using apache HttpClient's GetMethod to get the contents in URL.That url contains nothing
I am using Apache Solr for indexing using DataImportHandler. The document structure is as
Using Apache on a Red Hat server, I'm trying to rewrite the URL of

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.