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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:46:12+00:00 2026-06-17T15:46:12+00:00

I just rebuilt one of our websites in Expression Engine and everything has been

  • 0

I just rebuilt one of our websites in Expression Engine and everything has been going great! I needed to create a bunch of redirects to hopefully fix some old URL’s from the previous site.

Example:

The old site created URL’s like: index.php?id=30

this one for instance needed to be redirected to: http://www.example.com/contact

So in my .htaccess I created:

Redirect /index.php?id=30 http://www.example.com/contact

I did this about 50 times for all the various ID’s. However, when I go to these links, they just drop me on the homepage and keep the URL how it was. (www.example.com/index.php?id=30).

Then I noticed it doing this for ANY URL that doesn’t exist. So I could type in:

http://www.example.com/asdasdjasdbjhasdbjhasdbjhasdbjhasdbjhasd

and it simply drops me on the homepage.

Here is what else I have in my .htaccess file with some examples of redirects. This first bit just removes the /index.php from the URL’s.

RewriteEngine On

    # Removes index.php from ExpressionEngine URLs
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]

Redirect /index.php?id=30 http://www.example.com/contact

Redirect /index.php?id=26 http://example.com/careers

Redirect /index.php?id=28 http://example.com/about

So what is going on here, does Expression Engine have built in redirects that are breaking my redirects?

Thanks for the help!

  • 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-17T15:46:13+00:00Added an answer on June 17, 2026 at 3:46 pm

    You can’t match against the query string in a Redirect statement, you need to use a RewriteCond and match against the %{QUERY_STRING} variable. Make sure to add these rules BEFORE your expression engine rules:

    RewriteCond %{QUERY_STRING} ^id=30
    RewriteRule ^/?index.php$ http://www.example.com/contact [L,R]
    RewriteCond %{QUERY_STRING} ^id=26
    RewriteRule ^/?index.php$ http://www.example.com/careers [L,R]
    RewriteCond %{QUERY_STRING} ^id=28
    RewriteRule ^/?index.php$ http://www.example.com/about [L,R]
    

    etc.

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

Sidebar

Related Questions

So I have just rebuilt my server, just on local network. Stick my site
just wondering if there is a way to reduce the amount of code needed
I have just used FastMM4 to detect leaks. I did not realise our application
Our site's autocomplete is getting painfully slow, so we're going to implement a caching
I have a simple little table (just 8 fields) an hour ago I rebuilt
I am developing my first multilingual C# site and everything is going ok except
I have a custom search going on in one of the website I am
I have just updated Eclipse, the Android SDK, and everything else that appeared updatable,
I had just thought I resolved a problem , but it seemed another one
I just installed Delphi 7 on a new Windows 7 pc . Everything finally

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.