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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:03:47+00:00 2026-06-10T12:03:47+00:00

The following mod_rewrite rule is causing my website to behave odd I type localhost/signin/.

  • 0

The following mod_rewrite rule is causing my website to behave odd I type localhost/signin/.

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^signin/?$ access.php [NC,L]

It causes all of the attached files (images, css, php, js) with relative links not to load? However when I type localhost/signin all the attached files with load like nothing is wrong. I think this happens because /signin/ is treated like a directory and all relative links will look into an non-existence directory for all the attached files.

Edit: I figured out a solution but it involves muddying up my markup which is not what I want. Look at my answer below and you’ll see.

However, I want these attached files to be ignored by the rewrite rules.

  • 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-10T12:03:48+00:00Added an answer on June 10, 2026 at 12:03 pm

    The problem

    The problem you have is (after clarification) not related to the use of rewrite rules. Please edit your question to accurately represent your problem.

    Almost certainly because you have references such as:

    <link rel="stylesheet" type="text/css" href="css/foo.css">
    <script src="js/foo.js">
    

    which means the route used to find the css/js files is dependent on the directory (virtual or real) of the current request.

    If the current request is /foo, the request is in the root dir. As such, the following urls would be requested:

    /css/foo.css
    /js/foo.js
    

    If, however the current request is /foo/, the request is in the dir /foo/. As such, the following urs would be requested:

    /foo/css/foo.css
    /foo/js/foo.js
    

    Use absolute urls

    The way to avoid this is simply to use absolute urls in your link/script tags:

    <link rel="stylesheet" type="text/css" href="/css/foo.css">
    <script src="/js/foo.js">
    

    That way, irrespective of the current url – the exact url in the link and script tag is used.

    Base tag – be careful

    You can as you note in your own answer use the base tag – but it’s much more obvious to not rely upon it. There are also problems with some browsers e.g. converting “#” into an a request for “/#” which is another reason to ignore the base tag’s existence.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following rule - Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond
I'm using mod_rewrite to transform: www.example.com/view.php?ID=1234 into www.example.com/1234 using the following rule: Options +FollowSymlinks
I have the following mod_rewrite rule: RewriteRule ^([^/.]+)/?$ search.php?action=procedure&procedureName=$1 This works fine in redirecting
I have the following .htaccess rule: RewriteEngine on RewriteRule ^(.*) http://www.server2.com/index.php?action=$1 I need to
I have the following mod_rewrite rule: RewriteRule ^home/ home.php [L] Fairly simple. When I
I'm looking to convert the following mod_rewrite rule to the Nginx equivalent : RewriteRule
I am using mod_rewrite to remap the URLs in my website in the following
I have the following rewrite rules <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME}
We have the following mod_rewrite condition/rule but it is returning a 404 error on
HI, Given the following apache/mod_rewrite rule taken from .htaccess within minify directory on the

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.