0
votes
1answer
32 views

Conveting .htaccess to Ngix rules

I need to convert htaccess file to nginx config. I http://winginx.com/en/htaccess but an error occurred when I update the nginx config file. The htaccess file reads: DirectoryIndex index.php ...
0
votes
1answer
50 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
1
vote
1answer
176 views

Nginx htaccess rewrite specified folder

I tried to convert this htaccess rules to nginx: apache # Necessary to prevent problems when using a controller named "index" and having a root index.php # more here: ...
-2
votes
1answer
48 views

Where to save nginx rewrite rules? [closed]

I am thinking about replacing apache webserver with nginx but some websites use .htaccess file and I want to ask... it is possible to declare rewrite rules inside website directory and not in server ...
0
votes
1answer
98 views

convert lighttpd to nginx rewrite rules

I'm trying hard to make my code work on nginx. This configuration works with lighttpd but I want migrate it to nginx. Rewrite rules on lighttd : url.rewrite-once = ( "^/(ui)/(.*)$" => ...
0
votes
1answer
102 views

Converting Drupal Boost .htaccess to Nginx

I'm trying to install Boost module to work with nginx. As we know Boost does not generate nginx directives just like Apache. Boost has the following directives for Apache's .htaccess: ### BOOST ...
0
votes
1answer
76 views

Trouble converting .htaccess rewrite rules for nginx

Hi all I am trying to convert the following .htaccess code <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
1
vote
1answer
194 views

Cache Busting and Include Files for Nginx

In Apache you can use the following to cache bust css and js files and server them as a single file with Apache's Include mod: <FilesMatch "\.combined\.js$"> Options +Includes ...
0
votes
1answer
80 views

Nginx complete folder protection not working

I have installed nginx(1.4.3) with PHP-FPM(5.4.20). i want to protect my wordpress wp-admin folder. my nginx configuration file domain.conf: server { listen 80; server_name example.com; ...
1
vote
1answer
291 views

Nginx 404 error page php with params

In Opencart, 404 error is shown in this url: /index.php?route=error/not_found This page has a 404 custom page with the template of all the website. I´ve tried in Nginx with: error_page 404 = ...
1
vote
2answers
3k views

nginx and owncloud, .htaccess security warning

I have a problem with nginx and owncloud. When i access the owncloud's login page i get this error: Your data directory and your files are probably accessible from the internet. The .htaccess ...
0
votes
2answers
487 views

Enable Cross Origin Scripting on Nginx from retina.js to load files from another URL?

Im running a retina image plugin along with W3 Cache for CDN support. W3 cache moves images to S3, but the JS file won't server the files from there due to the difference in URL (it goes from h ...
0
votes
1answer
58 views

Converting .htaccess to nginx rule

No matter what tools I try, it never works quite right. I have an api, that is called at /api/v1/method.format?arg1=x&arg2=x I have this .htaccess on /api/v1/: RewriteEngine on RewriteCond ...
0
votes
1answer
60 views

Converting .htaccess to nginx

RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) p.php?id=$1 [L,QSA] How would I change that to work with nginx? Also, where do I place ...
0
votes
1answer
143 views

Convert .htaccess http authorization to nginx

I need to convert the following .htaccess string to nginx config: RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] Can anyone help me? I'm running nginx + php_fpm configuration.
0
votes
1answer
381 views

.htaccess to Nginx for specific script/folder?

I've installed a script in a sub folder which relies on .htaccess rewrite rules - if you visit the script once install properly it redirects you a /login page which actually doesn't exist on the ...
0
votes
1answer
126 views

converted .htaccess to nginx is breaking my app

I have been working on this all day and still am not having no luck. I used an online .htaccess to config converter and so I don't think it converted everything correctly. The following is my ...
-1
votes
1answer
76 views

Converting rules from apache to nginx

I have problem with these rules: ErrorDocument 500 http://example.com/500.html RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] RewriteCond ...
0
votes
2answers
190 views

simple nginx rewrite rule

I need to rewrite (convert) this basic htaccess rules to nginx format. Can you help me? Thanks. RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f ...
0
votes
2answers
84 views

Allowing users with a dynamic htaccess across multiple servers

We have an application that is IP restricted via an .htaccess file. Another application is used to request access and updates the .htaccess with the users IP for a period of time. The current server ...
1
vote
2answers
102 views

Easiest way to implement url rewriting for multiple VHost on Nginx

I have a lot of Vhost on my server, and I'm looking for a way to easily configure Url rewriting without having to open Putty, connect on SSH and editing with vim. Is it possible to put the rewrite ...
0
votes
1answer
225 views

nginx: rewrite a non-existent php-file to another php-file with all arguments

i really need help here. Sitting for some time now and dont figured it out. I want to realize a very simple task - rewrite a non-existent php file to another existant php file with all arguments ...
0
votes
1answer
131 views

Migrating Apache rewrites to Nginx

I am trying to serve static HTML with server side PHP processing with Nginx. I have no experience with Apache. I would like to migrate the following re-writes from Apache's .htaccess to Nginx. What ...
2
votes
2answers
695 views

How to dynamically reload nginx config

I'm currently trying to setup Nginx for a domain with production, testing and development stages. Each comes with it's own partial Nginx config file with rewrites. The production and testing stages ...
2
votes
2answers
119 views

How to serve different application & server based on cookie

I'm building the frontend marketing website for a web application. The frontend is WordPress on one server and the app is on another. We will set a cookie for users who are already customers. For ...
1
vote
1answer
651 views

.htaccess 500 internal server error , bad flag

I'd like to add the following to my Magento .htaccess file: RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/ RewriteRule ^index.php$ http://www.mystore.com/ [R=301,L] However ...
0
votes
1answer
83 views

How to convert this .htacess to nginx

I need to convert RewriteEngine on RewriteBase /generate RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/(.*)/ index.php?file=$2 To nginx conf Can ...
8
votes
1answer
19k views

What is the name and location of the Nginx config file (htaccess equivalent)?

There are many tutorials on how to write Nginx rewrite rules to mimic Apache's .htaccess file but I can't confidently say I know what the name or location of this so-called Nginx config file actually ...
0
votes
1answer
234 views

Need help translating this htaccess rewrite rule to Nginx

Hi – I've been struggling with this for days. It seems simple but I just can't get it done. I have a site developed in CakePHP. There's a script that responds to /css/profiles/g/whatever.css ...
1
vote
1answer
145 views

How do I replicate my .htaccess functionality in NGINX

I have the below .htaccess file in apache that redirects all request to app/index.php with or without a GET parameter. I just installed NGINX and my application won't run. Can anyone assist in ...
0
votes
2answers
306 views

nGinx non-www to www redirect

I have been working with apache for years and now wanted to move to nGinx keeping in view the performance everyone on internet seems to be talking about. But I its very frustrating for me for not ...
0
votes
2answers
189 views

nginx rewrite rules for bamboo invoice

I just migrated a webserver from Apache to nginx and I can't get the .htaccess conversion to work properly. The app I'm trying to use is bamboo invoice [http://bambooinvoice.org/], and it comes with a ...
-3
votes
1answer
196 views

Magento Using https:// for all links in source

So today I was trying to install a fresh instance of Magento v1.7.0 on my vps which is running nginx. Once I uploaded the clean install to public_html I unzipped it and entered my ip to run the ...
0
votes
1answer
129 views

Move from apache to nginx: 3rd party .htacces files. any recommendations?

I am considering moving from apache to nginx. However, there is one problem I don't really know how to handle best: On my server I have some 3rd party software, e.g. phpbb, phpmyadmin etc., and these ...
1
vote
4answers
563 views

Htaccess strange behaviour with Nginx

I have a site running on Nginx (v1.0.14) serving as reverse proxy which proxies requests to Apache (v2.2.19). So Nginx runs on port 80, Apache is on 8080. Overall site works fine except that i cannot ...
2
votes
2answers
4k views

What is nginx equalant for my htaccess mod_rewrite?

Previously i was using linode VPS running Apache for my CodeIgniter website. Today i installed nginx and my website landing page is coming but the other pages that is using htaccess for rewriting URL ...
1
vote
1answer
574 views

Convert nginx to Apache rewrites

I'm trying to set up CodeIgniter from an existing site that's on nginx. My local machine is Apache and this is the redirect scheme on nginx. How do I write this using RewriteRules? if ($host ~* ...
0
votes
1answer
420 views

apache rewrite > nginx rewrite

I finnaly got nginx running my site are made with codeigniter and I have this old rewrite from my .htaccess #map all request urls to a specific controller method RewriteRule ^(.*)$ ...
0
votes
0answers
255 views

apache mod-rewrite to nginx rewrite

I just changed to NGINX from Apache and I am using Zencart with Ultimate SEO for friendly urls I have tried to convert my .htaccess rules for NGINX but I get "No Input file specified" or a 404 error. ...
1
vote
1answer
275 views

how to convert this .htaccess from Apache to Nginx?

I need to convert this .htaccess to Nginx format, please guide me if you can. DirectoryIndex index.php FileETag none ServerSignature Off Options All -Indexes <IfModule mod_rewrite.c> ...
-5
votes
1answer
318 views

Convert this .htaccess directive to nginx for me

<Files urllist.txt> order allow,deny Allow from xx.xx.91.29 </Files>
1
vote
2answers
675 views

htaccess to nginx (watermark images under nginx)

I recently installed NGINX as a reverse proxy for my apache server, to handle static files. So far so good, everything working fine, except for the fact that I cant watermark my images anymore. My ...
0
votes
1answer
6k views

Htaccess on Nginx

I have one Question. How can I use my Htaccess File on nginx? I have seen something like that: http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ But I don't know if this is working and ...
7
votes
3answers
5k views

Limit upload file size and redirect user to error page if limit exceeds

Is it possible to redirect user to file file too big page when POST request size exceeds specified limit? I am aware about max-request-size option, but it gives just static page that cannot be ...
2
votes
2answers
894 views

.htaccess per directory in nginx

I am new to nginx and I have been on apache before. In apache, each directory can have a .htaccess to target the directory and and it's subdirectories. Is this possible for nginx? If so, how do I do ...
0
votes
3answers
386 views

Apache rewrites to Nginx

I'm trying to install thebuggenie on my Nginx server. Unfortunately, it sits in a subdirectory (nothing I can do about it) and uses apache rewrites for ALL of it's URLs. I had some success when I had ...
1
vote
1answer
581 views

Apache htaccess -> Nginx rewrites

Help me please to write nginx rewrites instead of that Apache htaccess: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond ...
0
votes
1answer
762 views

How to chain rewrites in Nginx?

I'm new to nginx's rewrite engine. I'm trying to convert my old htaccess file over to nginx's format but I'm running into some trouble. # ------------------------------------------------------ # # ...
2
votes
1answer
2k views

Convert HTACCESS mod_rewrite directives to nginx format?

I'm brand new to nginx and I am trying to convert the app I wrote over from Apache as I need the ability to serve a lot of clients at once without a lot of overhead! I'm getting the hang of setting up ...
1
vote
5answers
2k views

How can I prevent hotlinking? (nginx)

I use nginx and I have no access to server conf. May be with .htaccess analogue?..