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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:50:55+00:00 2026-06-05T13:50:55+00:00

I have 2 pages Advertisement.php and Gidc.php and they work if they have user=some

  • 0

I have 2 pages Advertisement.php and Gidc.php and they work if they have user=”some value”
For example:

example.com/advertisement_final_page.php?user=sumeet

and

example.com/gidc_final_page.php?user=nikhil

I want code for htaccess to redirects it to above pages:

example.com/sumeet

and

example.com/nikhil

My database is:

id 1

Type Advertisement

user sumeet

contact 651651

owner Sumeet Patel

website asdfkjh.com

email sdfjh@skdj.com

address skjdf, sd, sdh

id 2

Type Gidc

user nikhil

contact 651651

owner Nikhil Patel

website sadfjh.com

email sdf@sdhf.com

address skjdf, sd, sdh

My htaccess rules:

Options +FollowSymlinks
RewriteEngine on

RewriteRule ^([a-zA-Z0-9_-]+)$ advertisement_final_page.php?user=$1
RewriteRule ^([a-zA-Z0-9_-]+)$ gidc_final_page.php?user=$1

But by above codes it reach to advertisement_final_page.php page.
Like if I enter

example.com/nikhil

it redirects to

example.com/advertisement_final_page.php?user=nikhil
  • 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-05T13:50:57+00:00Added an answer on June 5, 2026 at 1:50 pm

    The patterns in your rules seem to be identical. The RewriteEngine will match the first rule it can, in this case the first.

    You should probably write a controller file that you redirect all your requests to. Then read the required user from $_GET['user'], read the user’s data from your database and redirect/include the appropriate PHP file based on the user’s Type.

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

Sidebar

Related Questions

I want to have pages accessed as if they were folders. For example: domain.com/state
I have pages named help.php , about.php and the address will look like: www.example.com/help.php
I have pages like index.php?key=toplist&list=magic So if om on that page for example, i
I have two pages, one that edits user information, and one that edits information
I have web pages that are endless pages -- i.e. if the user goes
I have a project that lives at the following domain: http://www.example.com/PROJECT/ within project, there
I have pages like this: page.php?id=1&name=whatever How could I transform this into... page/1/whatever
I need to display advertisement only on main page of my website (example.com). I've
My users have pages: user favorites users image I try to do a page
If I have pages having server-side code in code-behind, then I know that 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.