I have these rewrite rules (I tried both with no avail):
location ~* "^/([a-z0-9]{32})\.png$" {
rewrite ^ /index.php?page=log&id=$1 last;
}
and
location ~* "/(?<hash>[a-z0-9]{32})\.png" {
rewrite ^ /index.php?page=log&id=$hash;
}
and
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite "^/([a-zA-Z0-9]{32})\.png$" /index.php?page=log&id=$1 l
I'm running Nginx on an Apache server. Everything seems smooth except rewrite rules for IE, my site is displaying perfectly on Firefox, Chrome, Safari, Opera except Internet Explorer where images comes with red X and links doesn't seem to work.
I need help to rewrite rules for IE, here is my .htaccess file. I heard Nginx don't support .htaccess, if not then where should add any rules for IE?
I have the following location block, as part of a complex routing for a CMS:
location @mylocation {
if (-d $request_filename) {
rewrite ^/(.*)$ /$controller/$siteName last;
break;
}
if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {
rewrite ^/(.*)$ /$controller/$siteName/$1 last;
}
}
$controller is something
if (!-e $request_filename){
rewrite /iOS/(.*jpg)$ /$1 last;
rewrite /iOS/(.*jpeg)$ /$1 last;
rewrite /iOS/(.*png)$ /$1 last;
rewrite /iOS/(.*css)$ /$1 last;
rewrite /iOS/(.*js)$ /$1 last;
rewrite /Android/(.*jpg)$ /$1 last;
rewrite /Android/(.*jpeg)$ /$1 last;
rewrite /Android/(.*png)$ /$1 last;
rewrite /Android/(.*css)$ /$
I am very new in rewriting in nginx but although I've spent 2 days reading on forums, I still can't get some Codeigniter rewrites working ...
Our OpenCart is running on Lighttpd and we use mod_rewrite for SEO.
Whenever we have our rewrite rules on, GET requests such as http://www.site.com/dev/?gclid=XXX do not work.
Here are my current rewrite rules for OpenCart:
server.modules += ( "mod_rewrite" )
url.rewrite = (
"^(.)--v[^/]--(.*)$" => "$1$2"
)
url.rewrite-once = ( "^/dev/$" => "/dev/index.php?route=common/home")
url.re
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.
im having difficulties with a relativity simple rewrite rules in nginx config.
All I want to do is, if requested dir or file 'host/my/request/path[/[index.php]]' does not exist, rewrite to 'host/my/request/path.php'
Current rewrite works for:
host
host/
host/my/request/path
But wont work for:
host/my/request/path/
Here is the rewrite part of the config:
location = /(.*)/ {
Currently, i have working with a Zeus server and we have a website which is developed using Wordpress. Zeus Sever don't support the .htaccess file which is required to install wordpress and also for the SEO. however, there is another way we can manage Zeus to achieve our tasks by defining some rewrite rules.