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.

Link to comment
Share on other sites

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.

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.