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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:19:42+00:00 2026-05-12T10:19:42+00:00

Redirect 301 /resort.php/FOO/BAR http://www.sitename.com.com/index.php RewriteRule ^/direct/(.*) /direct/$1 [QSA,L] # access non i18n files directly

  • 0
Redirect 301 /resort.php/FOO/BAR http://www.sitename.com.com/index.php
RewriteRule ^/direct/(.*) /direct/$1 [QSA,L] # access non i18n files directly
RewriteRule ^/([a-z]{2}\/.*)        /$1 [QSA,L] #any language subdirectory should be left alone
RewriteRule ^/(.*\/$)               /en/$1index.php [QSA,L] #fix for links ending in /
RewriteRule ^/(.*\.php)             /en/$1 [QSA,L]  #any php file with no language subdirectory redirects to the default language

What’s the explanation for why the first Redirect 301 isn’t going to the homepage? When I replace it with..

RewriteRule ^/resort.php(.*) http://www.sitename.com/index.php [R=301,L]

It starts working. I’m sure it’s because I have a bunch of rules and it goes to one and jumps to the other but I’m kinda lost and maybe a guru could explain this more clearly.

My directory structure is like so:

/en/index.php
/direct/

There is no /index.php in the root, I’m redirecting it to en initially.

  • 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-12T10:19:42+00:00Added an answer on May 12, 2026 at 10:19 am

    The Redirect directive is getting into a bun-fight with mod_rewrite. The latter is quite aggressive, and is probably over-writing the redirect HTTP header set on the response by the Redirect directive.

    You’ve already found the solution – use a RewriteRule to perform the redirect. The [L] flag means “last rule – don’t process any more”, which is how you prevent the rules from interfering with each other. The plain Redirect directive is just an easy way of achieving the simpler functionality of RewriteRule.

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

Sidebar

Related Questions

I have the following redirects in my htaccess file Redirect 301 /communityed/index.htm http://www.domain.com/community_education Redirect
I am using a 301 redirect command in .htaccess file Redirect 301 /fr/emergency http://www.sitename.com/fr/d’urgence
I tried: //301 Redirect Old File Redirect 301 www.mydomain.com/subdirectory http://newurl.com but that lands me
I have the following in a .htaccess file redirect 301 /page.php http://domain.com/page Which works
I'm attempting to issue a 301 redirect when a user requests http://www.mysite.com/Default.aspx to http://www.mysite.com/
so i want to do an external permanant redirect (301) from http://www.creya.com to http://creya.com
I want the htaccess Redirect 301 to do the following: http://mysite.com/article.php?id=123 to http://mysite.com/123 Another
I tried putting this code Redirect 301 /pagename http://www.example.com/pagename.html in my .htaccess file; but
So my .htaccess file looks like this RewriteBase / Redirect 301 /page.html http://www.yoursite.com/newpage.html Redirect
I want to 301 redirect from: www.olddomain.com to the root of newdomain.com but I

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.