Jump to content

[SOLVED] Ajax / SEO Url Problem


elgoog

Recommended Posts

I have SEO Urls on my site and when trying to use any ajax such as below or dynamic dropdowns etc

 

w3schools.com/PHP/php_ajax_database.asp

 

They all work fine when i use the script on the page www.example.com/page

 

but when a trailing slash is added  www.example.com/page/

 

Any ajax script is calling in another copy of the entire page, not just what is contained in the external php file like it does without the slash

 

Does anyone know why this is happening?

 

Thanks in advance

Link to comment
Share on other sites

if the file litterly is called page then its different you are not using a url rewrite at all.

www.example.com/page

calls the page and parses the php code inside that file

 

www.example.com/page/

this will look in the directory called page instead of parsing the page file(which prob leads to an error)

what you could do is url rewrite

www.example.com/page/ so it opens the file

Link to comment
Share on other sites

Thanks Dj Kat

 

Instead of trying to call the external file with external.php

 

i called it using the whole path www.example.com/page/external.php

 

Seems like it was looking for the file in the page/ directory and not the root.

 

 

Problem Solved

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.