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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:53:05+00:00 2026-05-11T19:53:05+00:00

I am new to .htaccess and mod_rewrite. I am using the following rewrite rules:

  • 0

I am new to .htaccess and mod_rewrite.

I am using the following rewrite rules:

RewriteRule ^wants/([0-9]+)$ /wantlist.php?wantid=$1
RewriteRule ^dashboard$ /dashboard.php

I am able to successfully redirect both the cases.

But in order to do this, I had to change the CSS, JS and other paths to absolute paths without which the CSS and JS did not load.

I was using

<script type="javascript" src="js/javascript.js"></script>

which after the rewrite rule did not work and after I changed it to

<script type="javascript" src="http://example.com/js/javascript.js"></script>

I got it to work.

The same is happening for any of the other URLs on the website.

Is there a way to bypass this as I am using relative paths almost everywhere in the site I am developing?

  • 1 1 Answer
  • 4 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-11T19:53:05+00:00Added an answer on May 11, 2026 at 7:53 pm

    This is an URL resolving issue. See mod_rewrite URL info required

    You could explicitly set a base URI with the BASE HTML element, for example:

    <base href="/">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm rather new to the whole .htaccess thing and I'm using the following right
The following sample plugin adds the custom mod rewrite rules to .htaccess when the
I am new to url-rewriting. I have written few rewrite rules in the .htaccess
I have the following rewrite rules: <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / # Route
Using mod_rewrite, what RewriteRule(s) would make the following two examples function properly? Example #1
I have the following code in my .htaccess: RewriteEngine On RewriteBase / RewriteRule ^index\.php$
The following htaccess rule doesn't work because of the umlauts. Redirect 301 /xyz/händedruck.html /new/händedruck.html
What I'm trying to accomplish with htaccess mod-rewrite: Redirect all sub-domains to new domain
I'm new to PHP and i was trying to learn mod rewrite to rewrite
I using htaccess mod_rewrite for a product site. when a product is going to

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.