I have 2 little cases in htaccess rules that I have to solve, .... with your help... :)
The first one is that:
- I Have a subdomain on clientWebsite in there is an htaccess file and an folder like that:
- .htaccess
- uploads
- 2010
- mwdia1.jpg
- media2.jpg
- 2010
The .htaccess file contains:
RewriteEngine on
RewriteCond %{HTTP_HOST} hello.clientWebsite.com
RewriteRule (.*) http://clientName.myCompanyWebsite.com/$1 [P,L]
This is just an http request redirection to making the hello.clientWebsite.com pointing on the website that I host for this specific client.... Pretty simple for now. The problem is that I host the medias files in that subdomain and I would like to access to these files by writing: hello.clientWebsite.com/uploads/2010/media1.jpg. The problem is that the htaccess redirect also this request to clientName.myCompanyWebsite.com/uploads/2010/media1.jpg... What I have to write in the htaccess to redirect only if the request is not on an media? (The folder 2010 is the year so there can have multiple subfolders in uploads...)
My second case is pretty much the same problem... I Have wordpress installed on my server and I use the clean permalinks pattern (year/month/day/postName). Wordpress has giving me htaccess code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
The problem is that in my blog, I have to make some ajax call on a file in that folder : "wp/wp-content/plugins/myPlugin/myFile.php" (the wp folder is a symbolic link pointing on wordpress folder). My ajax call look like this (jQuery) :
$.ajax({
type: 'POST',
url: 'wp/wp-content/plugins/myPlugins/myFile.php',
success: function(msg) {
alert(msg);
}
});
This code alert me "Hello" (which is the text in myFile.php) on the home page (myWebsite.com/), but the ajax call doesn't work on an post page with url (myWebsite.com/2010/10/05/myPrettyLittlePost).
Someone can help me on these little case?