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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:18:41+00:00 2026-05-12T14:18:41+00:00

I am trying to rewrite a URL for a Dreamhost served website. I want

  • 0

I am trying to rewrite a URL for a Dreamhost served website.

I want to do the following:

Goal:

Rewrite only URLs that start with an x.

This:

http:// domain.com/x23

Should become:

http:// domain.com/index.php/lookup/code/x23

I tried this:

RewriteEngine On
RewriteRule ^(x[0-9a-z])$ index.php/lookup/code/$0 [L]

but it doesn’t seem to work.

What am I missing?

  • 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-12T14:18:42+00:00Added an answer on May 12, 2026 at 2:18 pm

    You forgot a quantifier for [0-9a-z]. Your expression does only allow one character of [0-9a-z]. Try the + quantifier for one or more repetitions:

    RewriteRule ^x[0-9a-z]+$ index.php/lookup/code/$0 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to rewrite URLs like this: http://url.maxk.me/abc to http://url.maxk.me/?url=abc , but for
I'm trying to rewrite a url of this: http://www.foo.com/bar/baz to index.php?q=$1&d=baz Where bar is
I am trying to rewrite this url: http://www.sample.com/product_guide&product_name=waht&product_type=dog-clipper to: http://www.sample.com/waht/dog-clipper I am using this
Im new to this and im trying to rewrite URL so that utm_expid is
i am trying to rewrite any URL that match this pattern: ~/Ahmed ~/Name to
I am trying to URL Rewrite to the following URL Http://***.com/index.php?p=forum&mod=view_posts&page=$3&name=$2&id=$1 Http://***.com/forum/{id}-{name}/{page} Http://***.com/forum/1-Hello-World/1 I
I'm trying to rewrite this url: http://www.example.com/user.php?user=username into http://example.com/username I'm using this code in
I am trying to rewrite a URL from something like this: http://www.asdf.com/index.php to http://www.asdf.com/#welcome
I am trying to rewrite some urls with following nginx rewrite rule rewrite ^/some\/url\/(.*)\/$
I want to rewrite an url like this: http://www.piata-bio.ro/presa-bio.php?var1=http://news.google.com/news/url?sa=t&fd=R&usg=AFQjCNHmU7U7bXtlH9Lo8dXfBs64PqxgbA&url=http://www.eva.ro/divertisment/stiri/un-nou-concept-de-magazin-articol-35491.html to something like this :

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.