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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:36:24+00:00 2026-06-17T20:36:24+00:00

I have this htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ dl.php?id=/$1 [QSA,L] </IfModule> it

  • 0

I have this htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ dl.php?id=/$1 [QSA,L]
</IfModule>

it works perfect. I just have one problem, I insert my site urls and images like these

<img src="img/image.gif">
<a href="do.php">

its short url not full like

<a href="mysite.com/img/image.gif">

so when now I open 127.0.0.1/dl.php/1/ I can get

$_GET['id']

But my links and images want to open from

http://127.0.0.1/dl.php/img/h.png

but it must be

http://127.0.0.1/img/h.png

can anyone help me with this? I can’t change all urls in my site and make them full url. I have like 50 page and I want this htaccess just for dl.php file

  • 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-17T20:36:25+00:00Added an answer on June 17, 2026 at 8:36 pm

    It wants to do this because you’re using relative paths in your src.

    Simply prepend a / to your paths, and it will go to the root of your site (ie. relative to the domain), rather than relative from the current folder (of course, not a real folder, but according to the URL your browser doesn’t know any better).

    <img src="/img/image.gif">
    <a href="/do.php">
    

    Sorry to say but you will need to change each path. There is one alternative, but you’d still have to change every path unless dl.php contains like a header/footer. In this case, you can append a <base href=".." /> tag to the header, which will force relative paths to be resolved relative to the path you give it.

    <head>
        ...
        <base href="http://www.mysite.com/" />
    </head>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this .htaccess code that works perfectly: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$
Ok, so I have this .htaccess file that contains this <IfModule mod_rewrite.c> RewriteEngine On
I have this htaccess rule to redirect my page to data_parser.php RewriteEngine On RewriteRule
I have this in my .htaccess file: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On
I have published my site and I have this inside .htaccess: <IfModule mod_rewrite.c> RewriteEngine
Currently I have these rules in my .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule
I have the following in my .htaccess currently- <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^go/([^/]*)/([0-9]+)/([0-9]+)/?$
I have this code in my .htaccess: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule
I currently have a .htaccess file set up with this rule: RewriteRule ^([a-zA-Z0-9_-]+)$ user\.php?user=$1
I have a big problem with .htaccess rewrite rule, my code is this: <IfModule

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.