English 中文(简体)
是否有办法让阿帕奇以自己的名义提供带有问题标记的档案?
原标题:Is there a way to get Apache to serve files with the question mark in their name?
  • 时间:2010-03-18 05:36:54
  •  标签:
  • apache

我用植被(m-k-E)报废了一台纸浆。 由此而来的档案中,有姓名,如: foo.php?bar.html。 帕帕奇在之后会把所有东西都放在了吗? 是否有疑问,有没有办法让它忽视吗? As the query string delimiter (and see foo.php?bar.html as the requested file and not foo.php)?

To save you a trip to wget manpage:
-m : mirror recursively
-E : foo.php?bar becomes foo.php?bar.html
-k : convert links in pages (foo.php?bar now links to foo.php?bar.html inside of all the pages so they display properly)

最佳回答

吗? (百分比3F)

问题回答

然而,Apache诉1案没有处理。

我是用摩德_rewrite。 6. Nathan的建议,形式为:

RewriteEngine On 

# Convert ? -> %3F in queries and add .html to the end of the filename
RewriteCond %{ENV:REDIRECT_STATUS} !200 
RewriteCond %{QUERY_STRING} !^$ 
RewriteRule ^(.*)$ /$1\%3F%{QUERY_STRING}.html [L,NE]

# An addition for *.php files without question mark in its name, adding html to the end of the filename
RewriteRule ^(.*?).php$ $1.php.html




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签