im new to Mod_rewrite but problem is it ruins all my ajax and php
i use windows.location object to get current location for javascript example:
var str = location.pathname;
str=str.slice(0,str.lastIndexOf('/'));
problem that this never works since i used mod_rewrite. my .htaccess
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^cars/([^/]+)/?$ profiles.php?carname=$1 [L]
can some body lead me to way to fix this. ? also i face same problem with lading all imgs and css/.js but i heard i can write condition on .htaccess to only redirect .php !,
I need a way to find base address for ajax calls, and other way to find base address for php.