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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:45:57+00:00 2026-06-05T09:45:57+00:00

I am trying to use mod_rewrite to clean up some dynamic URLS that I

  • 0

I am trying to use mod_rewrite to clean up some dynamic URLS that I have.

My .htaccess in the root of the site is as follows:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^equipment/AlarisSystem/([^/]*)/([^/]*)$ /equipment/AlarisSystem/?manu=$1&model=$2 [L]

I want to rewrite from http://www.mysite.com/equipment/AlarisSystem/?manu=test1&model=test2 to http://www.mysite.com/equipment/AlarisSystem/test1/test2

If I were to type in the above “clean” address i get a 404 error. I have done research, and cannot find where I am going wrong. And yes, mod_rewrite is enabled. Thanks for your help.

EDIT
I know that my .htaccess file is being read. I did this to check:

Redirect /google.html http://www.google.com and this rule works correctly.

  • 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-05T09:45:59+00:00Added an answer on June 5, 2026 at 9:45 am

    Your rule seems correct, but you’re probably not rewriting into the right place. Where’s the script you want to rewrite into? It seems you’re rewriting into a directory.

    Perhaps you have additional rewriting rules that need to be applied further, in that case, you should get rid of the last rule [L] flag. Having it there makes mod_rewrite stop applying rules.

    If you want to check whether your query is being caught or not, you can set RewriteLog and RewriteLogLevel directives to help you.

    For a quick check, you can also set the [R] flag, and then you’ll be able to see in your browser where mod_rewrite is sending you to.

    Update:
    Your original rule works for me with an index.php file in the directory, even, but perhaps you can try using a RewriteBase to solve this:

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteBase /equipment/AlarisSystem/
    RewriteRule /([^/]*)/([^/]*)$ index.php?manu=$1&model=$2 [L]
    

    I see no reason for that rule to not work. The original error you’re getting is probably related to where you’re doing your rewriting. This is from an .htaccess file in the root.

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

Sidebar

Related Questions

I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I am trying to use PHP mod_rewrite to alter some URLs. As a test,
I use mod_rewrite/.htaccess for pretty URLs. I forward all the requests to my index.php,
I'm trying to use mod_rewrite to redirect URLs from a URL from an old
I'm trying to get .htaccess to rewrite urls for my site. For example: /Lessons/PhrasalVerbs/PVList/bringup
I'm trying to understand how to properly use mod_rewrite. I have posts in my
I'm trying to use mod_rewrite to create clean links. I've gotten it to take
I'm trying to use basic .htaccess authentication in a subdirectory of the root where
Hi I'm trying use a datepicker on a field I have. I'm trying to
Trying to use GnuPG with Delphi (Win32). I need to sign some file with

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.