0

i've got a problem using apaches module rewrite (browser friendly urls). I want to rewrite each request to an specified php document expecting any request containing a given string:

RewriteBase /folder/directory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]

How to include a condition to redirect requests including "teststring" (ignoring pre and post text) to another directory? I want to redirect jQuery ajax calls to another directory directly!


Finally got the solution: .htaccess mod_rewrite - how to exclude directory from rewrite rule

Community
  • 1
  • 1
tmieruch
  • 191
  • 4
  • 14

1 Answers1

0

I'm not sure if I understand what exactly you want. But here's my take on it:

RewriteRule ^(.*)teststring(.*) newdirectory [R,L]
Georg
  • 463
  • 1
  • 5
  • 15