Jump to content

How can you go to a non-existant URL and still get a page there?


millicent

Recommended Posts

I have inherited the PHP source code for a site and I'm trying to figure it out.  One thing that is seriously confusing me is that if you navigate to www.mysite.com/blog/, then it takes you to a blog page.  www.sitename.com/blog/ is what shows in the address bar, but there is no folder called "blog" at all!  The link to that page is in index.php, and it's just totally normal html: <a href="/blog/">Blog</a>

 

How is this possible? How can you navigate to a non-existant folder and it still shows a page there?

 

I have no means of contacting the original programmer, so could anyone please help me understand how they did that?  From googling around, it seems that there is something called mod_rewrite that could achieve this, but I searched the files and mod_rewrite does not appear anywhere in any of them.

 

If you could just tell me an appropriate search term, like "Oh that's the wibblewobble technique," then that would be plenty helpful.

The blog may be accessible through some url rewriting in an .htaccess file. You might search for mod rewrite. Also, depending on if the site is built in a framework, there may be a custom route. If you have all of the files on your computer, try searching the files for /blog/ and see what comes up.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.