There is such a site "Armory" for the WoW server.

When you click on any link in the menu

_armory.site.ru/search.xml?source=all&type=glyphs&subTp=druid&searchType=items 

Produces the error "404 Not Found"

And there are files. Htaccess

 # UTF8 supportAddDefaultCharset utf8php_value default_charset UTF-8RewriteEngine OnRewriteRule ^(.*).xml $1.php?%{QUERY_STRING}# RSS FeedRewriteRule character-feed.atom character-feed-atom.php?%{QUERY_STRING}Options -Indexes 

or

 # UTF8 supportAddDefaultCharset utf8#php_value default_charset UTF-8RewriteEngine OnRewriteRule ^(.*).xml $1.php?%{QUERY_STRING}RewriteRule character-feed.atom character-feed-atom.php?%{QUERY_STRING}#RewriteRule ^(.*).html $1.php?%{QUERY_STRING}#RewriteRule ^(.*).htm $1.php?%{QUERY_STRING}Options -Indexes 

In addition, a subdomain is registered in apache like this:

 <VirtualHost 127.0.0.1:8080> ServerName site.ru ServerAlias www.site.ru site.ru DocumentRoot /hdd/backup/www/site<Directory "/hdd/backup/www/site"> Options Indexes FollowSymLinks MultiViews AllowOverride All DirectoryIndex index.xml index.php index.html index.htm Order allow,deny Allow from all</Directory></VirtualHost> 

I tried to remake it under NGINX (I installed it with Apache), it does not redirect ... Help please.

  • That is, you need to write the correct rewrite code from XML to PHP. Help pliz - Nicolayka

1 answer 1

Try adding the keys in the lines with rules [R, L]

ExampleRewriteRule ^ (. *). Xml $ 1.php?% {QUERY_STRING} [R, L]

And in the rest by analogy.