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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:42:40+00:00 2026-06-10T13:42:40+00:00

My site uses URLs like example.de/user1 or example.de/project33 , which can be rewritten by

  • 0

My site uses URLs like example.de/user1 or example.de/project33, which can be rewritten by an .htaccess-file.

The string after the slash is choosen by a user.

My problem is, that some URLs are user profile links and should be rewritten to profile.php?id=... and some URLs are project-links, which should be rewritten to project.php...

How can you handle it?

I thought about a HTTP header, which trigger a rewriteCondition (like -l, -f, -d etc…).

  • 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-10T13:42:42+00:00Added an answer on June 10, 2026 at 1:42 pm

    Since you have no way to determine the appropriate target just by looking at the URL alone, you are going to need a dispatcher-style script to which you redirect all those requests, and that script then takes the decision for the final redirect towards profile.php or project.php. Can’t happen in mod_rewrite otherwise, as it does not have any knowledge of your custom-URL database.

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

Sidebar

Related Questions

I currently have a site which uses a MySQL 4.x schema, the site uses
I have site which uses $(selector).load(path) function in more than 300 pages. Now my
I have a site that uses a large centered background image, which naturally loads
I have a site that uses a menu control tied to a sitemapdatasource which
A site uses this link format for everything: example.com/?article=123 example.com/?category=456 example.com/?article=789&picture=012 An ASP classic
Well I have a site that uses relative paths for all the URLs. I
The site I manage uses php urls to show a detail.php dynamically for each
I have pages within a site containing a control that uses a query string
My site uses nginx. I use apache only for large file uploading to the
My site uses YUI Compressor to minify CSS and it's removing the space preceding

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.