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
https://forums.phpfreaks.com/topic/126729-solved-ajax-seo-url-problem/
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

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.