English 中文(简体)
301 URL使用GET变量的后向
原标题:301 URL redirect using GET variables

我们有一个需要根据两个URL变量的数值调整的URL。 http://img.ourserver.com/junk/imgrafter?var1=size&var2=imgname/strong。 http://img.ourserver.com/imgrafter/size/imgname.png/code>

我们可以在文件上或阿帕奇的书上这样做。

感谢!

最佳回答

Enable mod_rewrite and .htaccess through d.conf, 然后将本守则列入.htaccess以下条目:DOCUMENT_ROOT.

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteCond %{QUERY_STRING} (^|&)var1=([^&]+)&var2=([^&]+) [NC]
RewriteRule ^[^/]+/(imgfolder)/?$ $1/%1/%2.png? [L,R,NC]
问题回答

暂无回答




相关问题
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 ...

热门标签