Assigning Parameters

Hi, how to assign a parameter please for my web pages?

For example I have this landing page http://MYDOMAIN.com/lp/0010/index.html

and I want to be able to access it by assigning a paremeter

to it.

E.g. http://MYDOMAIN.com/?key=293

Meaning that both pages will lead to same web page.

Thanks

6 Replies

That all depends on the software you are using to run your website. If it's custom code from a scripting language, you need to access the environment variables to get the parameter. For example in PHP you would use $_GET['key'].

If you are using a CMS such as WordPress or Drupal, I would refer to their documentation. Both have plugin support so you may find one that has this functionality already.

If this is a one-off scenario for you, you may also be able to do it in your web server's virtual host file.

Thanks for your fast response :)

It's custom code from a scripting language.

How to access please the environment variables to get the parameter. (In PHP use $_GET['key'].)

Actually you're spot on!

Want to implement this:

To make the script show the correct page you have to append the url parameter key to the end. So for example https://ppcmode.com?key=9288

The key would be set and the correct landing page would load. The visitor however would only see: https://ppcmode.com in their browser.

I'm confused. Did you find your answer? Or do you still have a question/issue?

Well to apply this code first I need the following get down which I have no idea how to?

How to assign a parameter please for my web pages?

For example I have this landing page http://MYDOMAIN.com/lp/0010/index.html

and I want to be able to access it by assigning a parameter to it.

E.g. http://MYDOMAIN.com/?key=293

Meaning that both pages will lead to same web page.

Also just tried to create my landing page with php extension for another script and I get server error 500.

Why is that please? Need something changed in my server settings?

Check your Apache error log.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct