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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:51:23+00:00 2026-05-14T03:51:23+00:00

Greetings all, I need help combining some htaccess rewrites, these crazy regular expressions screw

  • 0

Greetings all,

I need help combining some htaccess rewrites, these crazy regular expressions screw with my head.

So I have a folder structure something like this:

     /www/mysite.com/page/member/friends.php
     /www/mysite.com/page/video/videos.php
     /www/mysite.com/page/messages/inbox.php

The URLs get rewritten to this:

     mysite.com/member/friends.php
     mysite.com/video/videos.php
     mysite.com/messages/inbox.php

(Notice the /page/ folder is hidden in the url, but I keep it on the server for better file organization)

The rewrite rules look something like this: (I’m new so correct me if they are flawed)

     RewriteRule ^video/(.*)$ /page/video/$1 [NC]
     RewriteRule ^member/(.*)$ /page/member/$1 [NC]
     RewriteRule ^messages/(.*)$ /page/messages/$1 [NC]

Now, I also need to do a completely different rewrite to a file called lobby.php inside of the member folder:

After the original rewrites, a sample url looks like:

     mysite.com/member/lobby.php?member=pws5068

I need a new rewrite to make it look like this:

     mysite.com/pws5068

Thank you for bearing with my super-long question here. How can I make this happen?

EDIT: To make this less confusing I’m moving lobby up a directory into just /page/ by itself.

  • 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-14T03:51:23+00:00Added an answer on May 14, 2026 at 3:51 am

    since you access 2 files in your member folder, you should differentiate them in your url structure. For instance:

     RewriteRule ^member/friends/(.*)$ /page/member/friends.php?id=$1 [NC]
     RewriteRule ^member/(.*)$ /page/member/lobby.php?id=$1 [NC]
    

    update

    According to your edit, it should now be

     RewriteRule ^member/friends/(.*)$ /page/member/friends.php?id=$1 [NC]
     RewriteRule ^member/(.*)$ /page/lobby.php?id=$1 [NC]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings All; I have a LinkedList of type String which contain some words like
Greetings all. I need to get some opinions from those outside of my work
greetings all, i have multi sub-domain on my domainname.com , i need to redirect
Greetings all, I have a question. On my MOSS 2007 dev box, I created
Greetings all, I have a question. I am trying to build a parametrized query
Greetings all, I have a simple JQuery function which is bound to an ASP:Button
Greetings to all and sorry for my English! I have a ListBox, it's ItemsSource
Greetings! I have some HTML that may or may not be valid. If the
greetings all i have a web application using (spring-hibernate) frameworks and when tried to
Greetings! My wife, my 9 year old, and myself all have iPhones with me.com

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.