Jump to content

Internal Domain Masking (PHP Queries)


justlukeyou

Recommended Posts

Hi,

 

I am building a website created from a database and I would like to mask the domain, can anyone advise how to do this and the best method.

 

I have also heard that Google disliks PHP query links.

 

This is an link, can I choose what appears in the link?

 

<a href="product.php?price=<?php echo $row['price']; ?>&discount=<?php echo $row['discount']; ?>&description=<?php echo $row['description']; ?>&awImage=<?php echo $row['awImage']; ?>&link=<?php echo $row['link']; ?>&fulldescription=<?php echo $row['fulldescription']; ?>" class='productlink' rel="nofollow" ><?php echo $row['description']; ?></a>

Link to comment
Share on other sites

Hi,

 

Domain masking ain't the right term to use for sure.

 

This is an link, can I choose what appears in the link?

Well, you can if you change the link to a form and send the data using POST. In that case the url can be whatever you like since you're sending the mission critical data behind the curtains.

 

Also that is one hell of a url since you send the product descriptions and stuff. Since you probably have the product data in database why not fetch it by only sending the product id? In that case you would only have to do:

<a href="product.php?id=<?php echo $row['id']; ?>" class='productlink' rel="nofollow" ><?php echo $row['description']; ?></a>

 

And you were concerned about SEO. In that case you might want to use use mod_rewrite to rewrite the urls to:

product/product-name

 

If you have unique product names you can fetch the product from database based on the name given. In real life it is rather poor implementation and i would suggest passing the id anyway. If you don't want the id to appear on url make a form and pass it via post.

 

Hope I'm making any sense.

Link to comment
Share on other sites

Many thanks,

 

I have tried getting the information using just the ID but I just cant get the information relating to the ID to echo on the final page.

 

I have tried all sorts.  I cant work out what code to use to echo the price but just inserting ID into link.

 

<?php echo $_GET['price']; ?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.