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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:55:07+00:00 2026-05-27T23:55:07+00:00

htaccess redirection and would like to redirect all visitors on (domain.com, domain.com/,domain.com/index.php ) to

  • 0

htaccess redirection and would like to redirect all visitors on (domain.com, domain.com/,domain.com/index.php ) to http://www.domain.com/index.php#block_1 . below is my rules in .htaccess

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^domain.com [NC] 
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] 

RewriteRule index\.php index.php#block_1 [NE]

i keep getting error 500, Some one point what im doing wrong

  • 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-27T23:55:08+00:00Added an answer on May 27, 2026 at 11:55 pm

    I believe the error is because you’re specifying an internal (Non-HTTP) redirect, which happens to send apache into a redirect loop.

    Try:

    RewriteRule index\.php index.php#block_1 [NE,R]
    

    Because browsers never send the anchor part of the URL string to the server, you cannot test for it, so this will likely cause an infinite HTTP redirect loop for the client.

    You will likely have to redirect to a second page, like this.

    RewriteRule index\.php otherpage.php#block_1 [NE,R]
    

    The mod_rewrite documentation explains it all.

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

Sidebar

Related Questions

I just want to get a quick htaccess redirection. ie: domain.com/subfolderGreen --> domain.com/index.php?folder=subfolderGreen (note
I would like to do the follow redirection using htaccess: From: http://www.mywebsite.com/home/?page_id=273&mnth=8&yr=1993 To: http://www.mywebsite.com/
I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like
I am trying to create a rewrite rule that accomplishes two things: Redirect (www.)?domain.com
What's the easiest way to convert these requests: http://www.example.com/en/ http://www.example.com/en/index.php To: http://www.example.com/index.php?language_id=en There's various
I am using a 301 redirect command in .htaccess file Redirect 301 /fr/emergency http://www.sitename.com/fr/d’urgence
my htaccess rule isn't working with rewrite with dashes in: RewriteRule ^([A-Za-z]+)$ index.php?do=$1 [QSA]
Is there a possible htaccess directive that can transparently forward request from index.php to
My dilema: In .htaccess in my website's root: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
In my htaccess file my ErrorDocument 404 statement is not redirecting to index.php. Instead,

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.