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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:21:59+00:00 2026-05-29T10:21:59+00:00

Im trying to pass some variables from the URL to the PHP script. Now

  • 0

Im trying to pass some variables from the URL to the PHP script. Now I know that www.site.com/index.php?link=HELLO would require $_GET['link'] to get the variable “link”. I was hoping there are other ways to do this without the variable.

For instance I want a link structure like this: www.site.com/HELLO. In this example I know that I have to create a Directory called Hello place an index file and it should work but I don’t want to create a directory and Im hoping there’s a way to “catch” that extra part after the domain. I’m thinking of creating a custom HTTP 404 Page that will somehow get the variable of the not found page, but I don’t know how to get the HTTP 404 error parameters. Is there another simpler way to get a variable without the use of the extra ?link= part? I just want it to be a structure like this www.site.com/HELLO.

  • 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-29T10:22:01+00:00Added an answer on May 29, 2026 at 10:22 am

    What you want is URL rewriting. You don’t mention what kind of web server you’re using, so I’ll assume it’s Apache.

    If you have mod_rewrite enabled on your web server, this can easily be accomplished by creating a .htaccess file in your document root with the following

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?request=$1
    

    This will make all requests – that match the regular expression [a-zA-Z0-9]+ – get forwarded to index.php. For instance, if you try to access domain.com/hello, PHP would interpret this as trying to access index.php?request=hello.

    You can read more about this in the Apache HTTP Server manual about mod_rewrite.

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

Sidebar

Related Questions

I'm trying to pass some variables from PHP to JS. I saw here that
Ok so I am trying to pass some string variables from a classic ASP
I'm trying to use node_load to pass php variables (as variables!) from one node
I am trying to pass multiple variables in a URL in PHP to GET
I'm trying to pass some POST variables from hidden inputs (using JQuery to change
I'm trying to pass some files from one app to another. I communicate the
I am trying to display some xml data from remote URL using jquery and
I'm trying to build a safe user authentication system. The code is from http://net.tutsplus.com/tutorials/php/simple-techniques-to-lock-down-your-website/
I am trying to create a function that will pass some parameters to a
I am trying to pass some Subsonic collections to a client via a web

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.