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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:08:40+00:00 2026-05-28T20:08:40+00:00

I am new to the URL rewrite rules and would like to rewrite some

  • 0

I am new to the URL rewrite rules and would like to rewrite some URLs. Below is my problem:

I have created two rules (which works fine) that will hide the *.php extension from the URL. One is to redirect “/abc.php” to “/abc”. Another rule is to Rewrite /abc as /abc.php. These two rules work fine and I use the following pattern.

  • ^([^/]+)/?\.php$ –> Redirects to –> {R:1}
  • ^([^/]+)/?$ –> Rewrites to –> {R:1}.php

Now I have a problem. I have a page which goes like www.example.com/member?getuser=chris (note that it’s not member.php?getuser=chrisyeung because of the previous rules). I want to rewrite the URL to:

www.example.com/member/chris

I tried to follow some tutorials and use the following pattern:

`^/member/(_[0-0a-z-]+)` --> Rewrites to --> `^member?getuser={R:1}`. 

…but it doesn’t work.

What am I missing?

screenshot of edit outbound rule
screenshot 2 of edit outbound rule

  • 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-28T20:08:41+00:00Added an answer on May 28, 2026 at 8:08 pm

    I don’t unterstand your first two rules. Rewrite *.php to * and * to *.php – sounds like a loop for me. I assume your files are named .php and you want your visitors use URLs w/o this file extension. Then just rewrite * to *.php.

    For your members pages, use:

    ^/member/([0-9a-zA-Z-_]+) member.php?getuser={R:1} [QSA]
    

    I changes the list of valid characters inside the [] and I call member.php directly – no need for issuing another rule. QSA is for passing through further URL params.

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

Sidebar

Related Questions

I would like to create rewrite rules in my .htaccess file to do the
The actually URL which my app uses is: http://site.com/search.php?search=iPhone but I would like it
Below code : URL oracle = new URL(http://www.oracle.com/); URLConnection inputStream =oracle.openConnection(); InputStream in =
I have a doubt about orkut's new URL Writing method. Earlier the home page
I have a web site built using asp.net with ugly URLs like /DisplayContent.aspx?id=789564 .
I have the following problem: I use a script that saves the referer URL.
I am new with cakePHP, I wish to rewrite my urls in my application.
This seems like exactly what you would want to do with the htaccess rewrite
So I just started messing around with Apache's rewrite module and would like to
I have the following rewrite rules: <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / # Route

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.