Convert Apache Rewrite rules into Nginx rewrite rules
$30-250 USD
Закрито
Опублікований over 12 years ago
$30-250 USD
Оплачується при отриманні
This job is easy if you know rewrite rules in php/unix (.htaccess) and on Nginx Webserver (config file).
I simply need a apache rewrite rule translated for nginx webservers so that is working fine.
The rule simply allow to use very seo proper urls like [login to view URL]
Without the rule the url would look like: [login to view URL]
There are 4 parts:
1. Forward non-www to www url for each URL
2. Forward proper url to the [login to view URL] file in background (note:the proper url will stay in browser)
3. Deactivate rewriting for some specific files like [login to view URL]
4. Also allow rule 2. for URLs that have only 1 keyword (../subfolder/keyword1)
That's it. Thank you.
Here is the apache rewrite rule from .htaccess:
------------------------------------------------------------------------------------------------------------------------------------
RewriteEngine On
RewriteBase /subfolder/
RewriteCond %{HTTP_HOST} ^[login to view URL]
RewriteRule (.*) [login to view URL]$1 [R=301,L]
RewriteRule ^([^¸·{|}´`'"+*^¯¨¬\\/~]+)/([^¸·{|}´`'"+*^¯¨¬\\/~]+)$ $1/$2/ [NE]
RewriteRule ^([^¸·{|}´`'"+*^¯¨¬\\/~]+)/([^¸·{|}´`'"+*^¯¨¬\\/~]+)/$ ../[login to view URL]$1&key2=$2 [NE]
# Allow URLs with only 1 keyword
RewriteCond %{REQUEST_URI} !^/subfolder/[login to view URL]
RewriteCond %{REQUEST_URI} !^/subfolder/[login to view URL]
RewriteCond %{REQUEST_URI} !^/subfolder/[login to view URL]
RewriteCond %{REQUEST_URI} !^/subfolder/[login to view URL]
RewriteRule ^([^¸·{|}´`'"+*^¯¨¬\\/~]+)$ $1/ [NE]
RewriteRule ^([^¸·{|}´`'"+*^¯¨¬\\/~]+)/$ ../[login to view URL]$1 [NE]
-----------------------------------------------------------------------------------------------------------------------------------------------
I have done nginx rules based on .htaccess you shows on bid. If you want, I can apply rules and test working on nginx config file (or virtual server config file) directly. I'm Nginx expert!.
I'm an experienced debian/ubuntu linux expert with over a decade of webserver knowledge. I've migrated several sites to nginx. I have a blog site that lists the articles I write concerning migrating to nginx. I've been doing R&D and programming work for a little over 5 years now sitting on the other side sort to speak. I want to work in milestones with you as the work here requires us to do some trial/errors as there might be some hidden problem I probably tackled before. I just want to get your nginx powered website up. There is also some information missing about your current state of the config so once I take a look at that I can fill in the gaps in your setup. Lets get this application nginx powered!