In Progress

htaccess to nginx conversion - Error [emerg] invalid variable name

I want to do htaccess to nginx conversion of the following code, i used following auto formatter to do the translation however i get a error as below, i dont know why and how to fix this issue. can you please help

Url i used to convert

[url removed, login to view]

Error i get

Invalid nginx configuration: nginx: [emerg] invalid variable name in /var/www/vhosts/system/[url removed, login to view]:12 nginx: configuration file /etc/nginx/[url removed, login to view] test failed

.htacess code

ModPagespeed on

Options -indexes

AddOutputFilterByType DEFLATE text/html text/plain text/xml

# BEGIN Rewrite

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteBase /

RewriteCond %{HTTP_HOST} ^[url removed, login to view]

RewriteRule (.*) [url removed, login to view]$1 [R=301,L]

RewriteCond %{THE_REQUEST} \s/+(?:index\.php)?\?search=([^\s&]+) [NC]

RewriteRule ^ /%1/? [R=302,L,NE]

## replace of space with -

# executes **repeatedly** as long as there are more than 1 spaces in URI

RewriteRule "^(\S*) +(\S* .*)$" /$1-$2 [L,NE]

# executes when there is exactly 1 space in URI

RewriteRule "^(\S*) (\S*)$" /$1-$2? [L,R=302,NE]

RewriteRule ^search/([^/]+)/page/([^/]+)$ [url removed, login to view]$1&page=$2

RewriteRule ^ads/css/([^/]+)$ ads/css/$1

RewriteRule ^ads/images/([^/]+)$ ads/images/$1 [QSA,L]

RewriteRule ^adwords/admin/([^/]+)$ adwords/admin/$1 [L]

RewriteRule ^adwords/([^/]+)$ adwords/$1 [L]

RewriteRule ^images/([^/]+)$ images/$1 [QSA,L]

RewriteRule ^images/([^/]+)/([^/]+)$ images/$1/$2 [QSA,L]

RewriteRule ^ajax/([^/]+)$ ajax/$1 [QSA,L]

RewriteRule ^info/([^/]+)$ info/$1 [QSA,L]

RewriteRule ^css/([^/]+)$ css/$1 [QSA,L]

RewriteRule ^css/([^/]+)/([^/]+)$ css/$1/$2 [QSA,L]

RewriteRule ^includes/([^/]+)$ includes/$1 [QSA,L]

RewriteRule ^includes/([^/]+)/([^/]+)$ includes/$1/$2 [QSA,L]

# if a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([^/]+)/?$ ?search=$1 [QSA,L]

</IfModule>

# END Rewrite

nginx code when i converted the values using above link is

if ($http_host ~ "^[url removed, login to view]"){

set $rule_0 1$rule_0;

}

if ($rule_0 = "1"){

rewrite /(.*) [url removed, login to view]$1 permanent;

}

#ignored: condition 0

if ($rule_1 = "1"){

rewrite ^/ /$bref_1/? redirect;

}

rewrite /"^(S*) /+(S*;

rewrite /"^(S*) /(S*)$";

rewrite ^/search/([^/]+)/page/([^/]+)$ /[url removed, login to view]$1&page=$2;

rewrite ^/ads/css/([^/]+)$ /ads/css/$1;

rewrite ^/ads/images/([^/]+)$ /ads/images/$1 last;

rewrite ^/adwords/admin/([^/]+)$ /adwords/admin/$1 last;

rewrite ^/adwords/([^/]+)$ /adwords/$1 last;

rewrite ^/images/([^/]+)$ /images/$1 last;

rewrite ^/images/([^/]+)/([^/]+)$ /images/$1/$2 last;

rewrite ^/ajax/([^/]+)$ /ajax/$1 last;

rewrite ^/info/([^/]+)$ /info/$1 last;

rewrite ^/css/([^/]+)$ /css/$1 last;

rewrite ^/css/([^/]+)/([^/]+)$ /css/$1/$2 last;

rewrite ^/includes/([^/]+)$ /includes/$1 last;

rewrite ^/includes/([^/]+)/([^/]+)$ /includes/$1/$2 last;

if (!-f $request_filename){

set $rule_17 1$rule_17;

}

if (!-d $request_filename){

set $rule_17 2$rule_17;

}

if ($rule_17 = "21"){

rewrite ^/([^/]+)/?$ /?search=$1 last;

}

Kemahiran: Reka Bentuk Grafik, HTML, PHP, Reka Bentuk Laman Web

Lihat lagi: want to do ads, nginx test, html formatter, how to fix com, how do i get translation, graphic design in nc, xml conversion, nginx, nginx configuration, error page design, d conversion, convert to ajax, nginx rewrite php code, variable html, html ajax 301 redirect, php search replace, www 301 index, error exists page, nginx rewrite url, formatter

Tentang Majikan:
( 63 ulasan ) Sydney, Australia

ID Projek: #6937497

4 pekerja bebas membida secara purata $24 untuk pekerjaan ini

diastark

Hello sir/madam , We have good experience of PHP,JOOMLA,HTML,HTML5,CSS, Ajax,jquesry,JavaScript,Mysql, Graphic Design,Website Design, Android, mobile application,Photoshop, Banner Design ,Flayer mail,Logo Design, Lagi

$20 USD dalam sehari
(76 Ulasan)
5.0
gcStudioOrg

Hello, i have sorted your error & rewrite the sections that are irrelevant. Please message me so we assign project & exchange files. Will provide support if necessary, thanks. Best regards

$20 USD dalam sehari
(20 Ulasan)
4.2
indoresolution

Hello, I have gone through your job post and being an expert web developer, I offer myself for the same. I have an extensive knowledge and experience in PHP, HTML, CSS, WordPress and Graphic Designing. Also I have g Lagi

$30 USD dalam 5 hari
(11 Ulasan)
3.2
DextersSEO

Hello, I have gone through your job post and being an expert web developer, I offer myself for the same. I will design and develop unique and fresh website for you. Please share the details/requirement of the website. Lagi

$25 USD dalam sehari
(8 Ulasan)
3.7
awsec2

Hi there , This is James , I'm having the expertise and experience respective to your project. will configure the htaccess rule correctly . Be advice there is need less than 15 for this project . Looking for Lagi

$10 USD dalam sehari
(0 Ulasan)
0.0