1

I would like to put a rewrite rule

RewriteRule /test /my/long/path/index.html

but my index.html fetch other files, by ajax, so it's not working simple like this. I need a rule for all subfiles of the directory
I tried:

RewriteRule /test /my/long/path/
RewriteRule /test/* /my/long/path/*

but I end up with a funny redirect http://my.domain.co/test/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/

Sorry for my ignorance in Apache, and thx

4

1 回答 1

2

您的 RewriteRule 无效。试试这个:

RewriteRule ^test(/.*)?$ my/long/path$1
于 2012-05-18T21:00:17.497 回答