Welcome! Log In Create A New Profile

Advanced

nginx .htaccess problem

February 01, 2011 06:41AM
[URL=http://img843.imageshack.us/i/showk.png/][IMG]http://img843.imageshack.us/img843/3512/showk.png[/IMG][/URL]

Uploaded with [URL=http://imageshack.us]ImageShack.us[/URL]

hi i just try to running my website on nginx i am really impressed the speed i have search engine script and working apache well i just made 81 port for nginx for testing purpose i found a .htaccess converter to nginx after this rewrite my site %90 works except if i type michael autocomplate works but if i put space after michael I i get error this is the error i get please see picture
i think one of command in htaccess it couldnt converted to nginx command my question is how can i fix this problem

apache .htaccess

<IfModule mod_rewrite.c>
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule \.htaccess - [F]
RewriteRule (.*)(style\.css)$ $2 [L]
RewriteRule (.*)(lightbox\.css)$ $2 [L]
RewriteRule (.*)(userdata\/)(.*)$ $2$3 [QSA,L]
RewriteRule (.*)(maps\/)(.*)$ $2$3 [QSA,L]
RewriteRule (.*)(test\/)(.*)$ $2$3 [QSA,L]
RewriteRule ^(.*)(index\.php)(\/?)(.*)$ index.php?page=index/$4 [QSA,L]
RewriteRule (.*)(install\/)(.*)$ $2$3 [QSA,L]
RewriteRule (.*)(addon\/)(.*)$ $2$3 [QSA,L]
RewriteRule (.*)(cron\/)(.*)$ $2$3 [QSA,L]
RewriteRule (.*)(js\/)(.*)(\.js)$ $2$3$4 [L]
RewriteRule (.*)(images\/)(.*)(\.)(gif|jpe?g|png|ico)$ $2$3$4$5 [L]
RewriteCond %{request_uri} !^index\.php
RewriteRule ^(.*)$ index.php?page=$1 [QSA,L]
</IfModule>


automatic converted
return 403;
break;
rewrite /(.*)(style\.css)$ /$2 last;
rewrite /(.*)(lightbox\.css)$ /$2 last;
rewrite /(.*)(userdata\/)(.*)$ /$2$3 last;
rewrite /(.*)(maps\/)(.*)$ /$2$3 last;
rewrite /(.*)(test\/)(.*)$ /$2$3 last;
rewrite ^/(.*)(index\.php)(\/?)(.*)$ /index.php?page=index/$4 last;
rewrite /(.*)(install\/)(.*)$ /$2$3 last;
rewrite /(.*)(addon\/)(.*)$ /$2$3 last;
rewrite /(.*)(cron\/)(.*)$ /$2$3 last;
rewrite /(.*)(js\/)(.*)(\.js)$ /$2$3$4 last;
rewrite /(.*)(images\/)(.*)(\.)(gif|jpe?g|png|ico)$ /$2$3$4$5 last;
#ignored: condition 0
rewrite ^/(.*)$ /index.php?page=$1 last;



myconf file is

server {
listen 81;
server_name *.mysite.ws;
access_log /var/log/mysite.access.log main;
error_log /var/log/mysite.error.log;
root /home/mysite/www;
index index.php index.html;

rewrite /(.*)(style\.css)$ /$2 last;
rewrite /(.*)(lightbox\.css)$ /$2 last;
rewrite /(.*)(userdata\/)(.*)$ /$2$3 last;
rewrite /(.*)(maps\/)(.*)$ /$2$3 last;
rewrite /(.*)(test\/)(.*)$ /$2$3 last;
rewrite ^/(.*)(index\.php)(\/?)(.*)$ /index.php?page=index/$4 last;
rewrite /(.*)(install\/)(.*)$ /$2$3 last;
rewrite /(.*)(addon\/)(.*)$ /$2$3 last;
rewrite /(.*)(cron\/)(.*)$ /$2$3 last;
rewrite /(.*)(js\/)(.*)(\.js)$ /$2$3$4 last;
rewrite /(.*)(images\/)(.*)(\.)(gif|jpe?g|png|ico)$ /$2$3$4$5 last;
rewrite ^/(.*)$ /index.php?page=$1 last;

location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}

location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/mysite/www$fastcgi_script_name;
include fastcgi_params;
}
}
Subject Author Posted

nginx .htaccess problem

lifeisjustabout February 01, 2011 06:41AM

Re: nginx .htaccess problem

lifeisjustabout February 01, 2011 06:41AM

Re: nginx .htaccess problem

lifeisjustabout February 01, 2011 06:54AM

Re: nginx .htaccess problem

lifeisjustabout February 01, 2011 06:44PM

Re: nginx .htaccess problem

lifeisjustabout February 02, 2011 04:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready