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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:54:41+00:00 2026-05-24T21:54:41+00:00

I have dynamically created images on my index.html page. I want the user to

  • 0

I have dynamically created images on my index.html page. I want the user to be able to click on them and be redirected to pic_page.html.

The image links on the index.html page look like this:

//<a href="http://mysite.com/index.html?bluepart=view&blueimage=29">//

My redirect code in .htaccess looks like this:

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{IMAGE}  ^bluepart=view&blueimage=([0-9]+)$
RewriteRule ^/index.html$ /pic_page.html [R=301,L]
</IfModule>

The redirect does not work. When I scroll down index.html and click an image, the page jumps back to the top of the index.html page.

Test links to pic_page.html such as this work fine:

//<a href="http://mysite.com/pic_page.html?bluepart=view&blueimage=23">test</a>//

Any idea why the redirect won’t work, and just jumps to the top of index.html?

Thanks,
Darrell

  • 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-05-24T21:54:42+00:00Added an answer on May 24, 2026 at 9:54 pm

    1. Question: Why don’t you use proper link in first place? You could easily avoid all these problems.

    2. Answer to your question: what %{IMAGE} supposed to do? I have no idea what %{IMAGE} means — it is definitely not a standard mod_rewrite variable.

    Change it to %{QUERY_STRING} then rule will work as intended:

    RewriteCond %{QUERY_STRING} ^bluepart=view&blueimage=([0-9]+)$
    RewriteRule ^index\.html$ /pic_page.html [R=301,L]
    

    P.S.
    I do not know why do you use redirect here (301 Permanent Redirect) and therefore I may be wrong, but I would use rewrite (internal redirect) instead of actual redirect (301, external redirect). For this — replace [R=301,L] by [L]

    Also, because this rule (as you have stated) is placed in .htaccess, no need for leading slash in rewrite pattern ^/index.html$ — should be just ^index.html$ (that leading slash is required IF rule is placed in Apache config file / virtual host context).

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

Sidebar

Related Questions

I have problem with dynamically created image (JavaScript). I want to change the innerHTML
I have many images which are created dynamically and I am showing them inside
I have an application where some images will be dynamically created based on user
I have dynamically created the buttons in a div. And binding the click and
I have a dynamically created list. Items from the list should be able to
I'm trying to trigger a click event on a dynamically created element. I have
On my page, I have a dynamically generated list of radio buttons (created with
I have loaded some images through XML and attached into dynamically created MovieClips named
I have a project to save pages created dynamically with php and store them
I have a page with a lot of images, each of them being wrapped

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.