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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:31:49+00:00 2026-05-31T06:31:49+00:00

I have a simple .htaccess file RewriteEngine on RewriteRule ^[^-]*-(.*)$ http://example.com/$1 [R] RewriteRule ^[(template)(internal)(stuff)(files)]

  • 0

I have a simple .htaccess file

RewriteEngine on

RewriteRule ^[^-]*-(.*)$ http://example.com/$1 [R]
RewriteRule ^[(template)(internal)(stuff)(files)] - [L]

RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?category=$1&page=$2 [L]
RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [L]
RewriteRule ^/$ index.php?page=news [L]

And when I request for http://example.com/foo/bar everything is okay – Apache2 redirects to http://example.com/index.php?category=foo&page=bar but when I request for http://example.com/aoo/bar or http://example.com/zoo/bar (when category name begins with a or z) it doesn’t get redirected – off by one error?

.htaccess tester http://htaccess.madewithlove.be also does it.

Can anyone figure it out?

EDIT:
aoo/bar – 404; boo/bar – index.php; coo/bar – index.php; doo/bar – index.php; eoo/bar – 404; foo/bar – 404; goo/bar – index.php; hoo/bar – index.php; ioo/bar – 404; joo/bar – index.php; koo/bar – 404; loo/bar – 404; moo/bar – 404; noo/bar – 404; ooo/bar – index.php; poo/bar – 404; qoo/bar – index.php; roo/bar, soo/bar, too/bar – 404; uoo/bar, voo/bar, woo/bar, xoo/bar, yoo/bar – index.php; zoo/bar – 404

  • 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-31T06:31:50+00:00Added an answer on May 31, 2026 at 6:31 am

    Your second rule is FUBAR. Figure out what you want it to do, and try again.

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

Sidebar

Related Questions

I have an htaccess file with a simple rewrite rule. RewriteEngine On RewriteRule ^([a-zA-Z0-9]+)/?$
In a .htaccess context, I have a simple rewriting rule : RewriteEngine on RewriteRule
I have an htaccess file that uses mod_rewrite to redirect /controller to /index.php?controller=%controller% Like
I have a simple URL rewriting setup with a .htaccess file. Excerpt: RewriteEngine On
My question is quite simple. I have my main page (www.domain.com/index.php) Is there a
Lets say I have a two websites www.sample.com and files.sample.com. In an .htaccess file
I have a very simple .htaccess file set up to redirect a 404 to
I have a directory on a site: http://example.com/directory/ In it I have a .
I have the following conditions in my .htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} ^ex\.co$
I have a website that has an index.php, a few simple .html pages and

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.