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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:20:01+00:00 2026-05-11T21:20:01+00:00

my boss wants me to code an URLrewriting for, let’s say http://our.domain.com/SomeText — that

  • 0

my boss wants me to code an URLrewriting for, let’s say “http://our.domain.com/SomeText” — that is, if the URL does NOT contain “.php” or “.html”, it should be processed by a script like “http://our.domain.com/process.php?string=SomeText“.
Is this possible with a simple regex? I just cannot find the right expression to do this.
I started by redirecting requests to some special subdir, but now it should work directly without any further subdir, so I somehow have to separate regular requests for exuisting pages to requests that don’t contain “.php” or “.html”…

Any advice or link for me?

Best regards,
Roman.

  • 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-11T21:20:01+00:00Added an answer on May 11, 2026 at 9:20 pm

    Using mod_rewite you could do this to re-write .php and .html URLs like this:

    RewriteEngine on
    RewriteRule !\.(php|html)$ process.php/$1 [NC] [QSA]
    

    However you may also want to stop it from re-writing URLs to files which actually exist. (There may be other files lying around – images/css etc. which you don’t want to be re-written) You could amend the above to add checks:

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule !\.(php|html)$ process.php/$1 [NC] [QSA]
    

    Adding this check may mean that you don’t actually need check whether the extension is anything other than .php or .html, because you know that it will only be rewritten if the requested file does not exist, so you could amend the RewriteRule line to be this:

    RewriteRule ^(.*)$ process.php/$1 [NC] [QSA]
    

    This will mean any requested URL that does not exist as a file will be handled by process.php.

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

Sidebar

Related Questions

My boss wants me to fashion a QR code so that when the user
My boss wants us to use subversion for our MS Word documentation. The idea
My boss is asking me to code a report that has the following components:
Primary key attractiveness I have a boss(and also users) that wants primary key to
My boss has big dreams. He wants to write an application that runs on
My boss wants the following: Requirements: Stream m4v videos from our Web-server to clients
I'm trying to redirect site.com w.site.com ww.site.com and wwww.site.com to www.site.com. My boss wants
I have a big problem. My boss said to me that he wants two
My boss wants me to encrypt some information used during data transfer. The individual
My boss wants me to develop some apps and make them appear on 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.