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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:49:53+00:00 2026-06-07T09:49:53+00:00

I am trying to redirect to a page based on a regex expression. Basically,

  • 0

I am trying to redirect to a page based on a regex expression.

Basically, product codes are made up of numbers and letters, nothing else.

Here is my htaccess:

Options +FollowSymlinks
RewriteEngine On

RewriteRule ^(.*)-(\d{1,2})-(\d{1,3})-(\d{1,3})$ search.php?q=$1&p=$2&m=$3&c=$4

RewriteRule ^([A-Za-z0-9])$ product.php?p=$1 [NC,L]

It is the last line I can’t seem to get to work. It just gives me a 404 page not found error. I know for a fact that the product.php file is there, and it is in the same place as search.php which works fine.

  • 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-07T09:49:55+00:00Added an answer on June 7, 2026 at 9:49 am

    I figured it out.

    RewriteRule ^([A-Za-z0-9]*)$ product.php?p=$1 [NC,L]

    I guess the * matches infinite times on whats before it.

    I found out because if I just went to /e, /E or /8 it would work.

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

Sidebar

Related Questions

I'm trying to redirect to a page but based on the answer from a
I'm trying to redirect this page Page to a Jquery mobile website that I'm
I am trying to redirect a page reading the url from the config file.
I'm trying to redirect to a page that uses basic authentication, with no success
I'm trying to redirect to a .php page if the $validForm variable is TRUE.
I am trying to redirect everything to a single page from my /website/folder/ directory.
I'm trying to figure out how to redirect to a new page (different application,
I am trying to using Nginx to redirect from /t/latest/2 to /topics/latest/page/2 rewrite ^/t/latest$
I've been trying to redirect my subdomain buynow.mydomain.info to the product link which is
I am trying to redirect my visitors to for example http://localhost/site/test.php?lang=en_US based on the

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.