Forum Moderators: open

Message Too Old, No Replies

Ajax doesn't works with .htaccess rewrite

Ajax doesn't works with .htaccess rewrite

         

rafarataneneces

7:03 pm on Aug 9, 2010 (gmt 0)

10+ Year Member



Hello
I have an Ajax function that has worked for year, and 6 months ago I implemented .htaccess rewrite

Here is an example:

1) WORKS
[gamingaccess.com...]

2) DOES NOT WORKS
[gamingaccess.com...]

it's the same URL, it's just a simple mod_rewrite

Does anybody knows how can I change Ajax functions or where can I download new functions that work with the SEO optimized pages?

Thanks in advance

rafarataneneces

7:04 pm on Aug 9, 2010 (gmt 0)

10+ Year Member



I forgot, try playing the HD version of the video

that is the part that contains AJAX

Fotiman

8:44 pm on Aug 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How do you play the HD version of the video? I couldn't figure out how.

Fotiman

8:48 pm on Aug 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The one thing I notice is that they are different directory paths:

/
vs.
/news/24564/

So if you have any scripts that load relative to the page (and you do), then those files might not load. For example, try changing these:

<script type="text/javascript" src="ajax-dynamic-content.js?123"></script>
<script type="text/javascript" src="ajax.js"></script>

To this:

<script type="text/javascript" src="/ajax-dynamic-content.js?123"></script>
<script type="text/javascript" src="/ajax.js"></script>

whoisgregg

9:27 pm on Aug 9, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Both URLs are working fine for me in Safari Version 5.0 (6533.16) for Mac. Maybe it's a browser issue?

Fotiman

5:09 pm on Aug 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It would appear that correcting the src attribute on your script tags may have fixed the problem, correct? To sum up, the path of your rewritten URL was located at a different subdirectory level and tried to include 2 files which needed to be accessed relatively from the document root instead of relative to the current page.

rafarataneneces

8:11 pm on Aug 10, 2010 (gmt 0)

10+ Year Member



Yeah,now Ajax works like a charm, thanks guys

that is the beauty of forums, some people can detect problems ASAP because they are not familiar with the page


I am familiar with the page, and it works great, so I had NO idea what the heck was going wrong, since I thought

"if it works great before Ajax, then it might be a problem with rewrite"

Thanks once again guys