5 Replies - 3544 Views - Last Post: 15 August 2012 - 04:51 PM Rate Topic: -----

#1 el_pancho  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 88
  • Joined: 26-April 12

Php fake page redirection

Posted 14 August 2012 - 02:06 PM

hi there,

a friend ask me to make some changes on his system, but i found a new way of redirection there, at least new to me,

he has a kind of function that redirects the page to a folder, but the folder itself does not exists instead of a 404 page it shows a legit website.

ex:

www.mysite.com -> index.php
www.mysite.com/videos/ -> should be going to the folder videos -> index.php
but this one goes to another page, that i couldnīt find tho, and the folder VIDEOS does not exist.

if the website has a PRODUCTS part, www.mysite.com/products/ shows the products page besides that there is no products folder.

supose that SOMETHING does not exits.

www.mysite.com/something/ -> and there is no folder named something, instead of showing a default 404 page, it shows a 404 page that he created.


i found this a REALLY cool stuff :D , i want to know where to look for this kind of knowledge, any ideas? how could it be done? posts about it? what kind of keyword should i use to look for this stuff?

if you have pacience, can you show me how this stuff works?

Is This A Good Question/Topic? 0
  • +

Replies To: Php fake page redirection

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6037
  • View blog
  • Posts: 23,432
  • Joined: 23-August 08

Re: Php fake page redirection

Posted 14 August 2012 - 02:29 PM

It's likely not PHP, it's whatever web server he's using that's providing the custom error page.
Was This Post Helpful? 2
  • +
  • -

#3 e_i_pi  Icon User is offline

  • = -1
  • member icon

Reputation: 789
  • View blog
  • Posts: 1,676
  • Joined: 30-January 09

Re: Php fake page redirection

Posted 14 August 2012 - 02:34 PM

You're probably after 404 redirects using htaccess. There's are decent article on it here and here.

This post has been edited by e_i_pi: 14 August 2012 - 02:34 PM

Was This Post Helpful? 1
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8939
  • View blog
  • Posts: 33,521
  • Joined: 12-June 08

Re: Php fake page redirection

Posted 14 August 2012 - 02:38 PM

.. or using multiviews from Apache.

https://httpd.apache...egotiation.html
Was This Post Helpful? 0
  • +
  • -

#5 el_pancho  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 88
  • Joined: 26-April 12

Re: Php fake page redirection

Posted 15 August 2012 - 01:14 PM

i just want to add that this is not just for 404 error pages, but for any page, if it has a showroom.php page, and i type www.site.com/showroom/ it loads the showroom.php.

i see so many websites with this kind o tecnology, like dreamincode or phpmaster, every post has it´s own "folder" like this post check the URL -> http://www.dreaminco...ge-redirection/

This post has been edited by el_pancho: 15 August 2012 - 01:23 PM

Was This Post Helpful? 0
  • +
  • -

#6 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: Php fake page redirection

Posted 15 August 2012 - 04:51 PM

It sounds to me that you are talking about mod_rewrite. That is typically used on Apache sites to allow sites to manipulate what URLs are being shown. In fact, most PHP frameworks just use a single .php file and rely on URL rewriting to direct all reqests to that file where it's processed. Custom error pages are then just generated by PHP when needed.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1