Find Jobs
Hire Freelancers

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

$10-30 USD

Dalam Kemajuan
Disiarkan lebih dari 9 tahun yang lalu

$10-30 USD

Dibayar semasa penghantaran
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 [login to view URL] Error i get Invalid nginx configuration: nginx: [emerg] invalid variable name in /var/www/vhosts/system/[login to view URL]:12 nginx: configuration file /etc/nginx/[login to view URL] 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} ^[login to view URL] RewriteRule (.*) [login to view URL]$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/([^/]+)$ [login to view URL]$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 ~ "^[login to view URL]"){ set $rule_0 1$rule_0; } if ($rule_0 = "1"){ rewrite /(.*) [login to view URL]$1 permanent; } #ignored: condition 0 if ($rule_1 = "1"){ rewrite ^/ /$bref_1/? redirect; } rewrite /"^(S*) /+(S*; rewrite /"^(S*) /(S*)$"; rewrite ^/search/([^/]+)/page/([^/]+)$ /[login to view URL]$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; }
ID Projek: 6937497

Tentang projek

4 cadangan
Projek jarak jauh
Aktif 9 tahun yang lalu

Ingin menjana wang?

Faedah membida di Freelancer

Tetapkan bajet dan garis masa anda
Dapatkan bayaran untuk kerja anda
Tuliskan cadangan anda
Ianya percuma untuk mendaftar dan membida pekerjaan
4 pekerja bebas membida secara purata $24 USD untuk pekerjaan ini
Avatar Pengguna
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 1 hari
5.0 (20 ulasan)
4.2
4.2
Avatar Pengguna
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 forward for hearing from you . Thanks in advance James C
$10 USD dalam 1 hari
0.0 (0 ulasan)
0.0
0.0

Tentang klien

Bendera AUSTRALIA
Sydney, Australia
4.9
63
Kaedah pembayaran disahkan
Ahli sejak Sep 13, 2008

Pengesahan Klien

Terima kasih! Kami telah menghantar pautan melalui e-mel kepada anda untuk menuntut kredit percuma anda.
Sesuatu telah berlaku semasa menghantar e-mel anda. Sila cuba lagi.
Pengguna Berdaftar Jumlah Pekerjaan Disiarkan
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Memuatkan pratonton
Kebenaran diberikan untuk Geolocation.
Sesi log masuk anda telah luput dan telah dilog keluar. Sila log masuk sekali lagi.