Jump to content

Recommended Posts

I am truly stumped by this.  This is surely a PHP installation question so I hope someone can answer it.  I tried a few searches but wasn't even sure how to word the question.

 

So here's the deal.  This website http://www.bennettig.com is our main company site.  There are php includes for header, menu and footer.  So all of the pages are index.php, contact.php, and so on.  Everything works fine but there is a problem.  I'll demonstrate:

 

http://www.bennettig.com/contact.php pulls up a contact page with the standard info (and a nifty googlemap!)

 

Now, http://www.bennettig.com/contact would also pull up the same page

 

However

http://www.bennettig.com/contact/gibberish pulls up a page with all of the elements broken.  It's still pulling the contact page code but the paths are all screwed up so the page is broken.  The point is, this shouldn't be pulling up that page at all right?  There should be a 404 page in it's place.  At the very least a page cannot be displayed.  You can type anything in the place of "gibberish" it doesn't matter.  You can even chain directories like http://www.bennettig.com/contact/contact/contact/contact and the same thing happens.

 

I'd love to knock this problem out.  Is it a PHP server setting (php.ini) or is it something actually in the coding?  I narrowed it to php when I tested the same thing on a couple of other sites that are .html only.

 

I appreciate any help!  :D

thanks,

 

Lewis

Link to comment
https://forums.phpfreaks.com/topic/115842-page-name-acting-as-directory/
Share on other sites

I do have Google Analytics code in the footer.php file.  I don't have any specific SEO software installed.  The server is a Mac web server by the way.  I talked with the admin but he wasn't sure about it and said he'd get back to me.  I'm fairly certain it's down to the server being the culprit.

Make a .htaccess file and put this in it:

 

RewriteEngine Off

 

 

You might not want to do that

back up your old .htaccess file first because you said you liked some of the mods ons, they just might not be strict enough.

 

I'm thinking he has some server-wide convenience RewriteRules or something.  He can set up his own if he knows how then.  But I'd assume he doesn't, otherwise he would have thought of it.

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.