Hi, I have problems with mod rewrite. I will try to describe...
I want clean urls but fail to make it work propperly. Maybe I have problems, because the content displayed is fetched from my other site...
There is a lot of stuff I already red about this, but somehow I can not find a solution for this:
Site 1 is used to fetch images for displaying on several other sites.
For example if I want to show a specific category the url is:
PHP Code:
http://www example1.com/show.php/tag=flower+red
To view these flowers on an other site, I use some php code like this, what works wonderful for this "dirty urls":
PHP Code:
$url="$url1".substr(getenv('REQUEST_URI'),1);
$postdata = "$url1";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
So on the 2. Site this shows me the same flowers as requested on the url above.
PHP Code:
http://www example2.com/show.php/tag=flower+red
But I need this request from the 2.Example-Site with clean urls. Like this:
PHP Code:
http://www example2.com/flower+red/
In .htaccess if the 2.Site I added this to make it work, but it fails:
PHP Code:
RewriteEngine On
RewriteRule ^([^/]*)/$ /show.php?tags=$1 [L]
From all I undertand from all this mod_rewrite, the following request should be the same:
PHP Code:
http://www example2.com/flower+red/
=
PHP Code:
http://www example2.com/show.php/tag=flower+red
But the request, which goes to site1 in this example is:
PHP Code:
http://www example1.com/flower+red/
Why doesn't site2 rewrite this request propperly first to the "dirty url"?