Re: Redirection problem again in new rules.

2016-04-20 Thread Muhammad Yousuf Khan
Thanks Alot Francis Daly, actually i was trying to understand the working of rewrite and location rules how they handle the query. you explain it very well. Thanks again for sharing such useful and detailed explanation. i really appreciate that. :) On Tue, Apr 19, 2016 at 4:23 AM, Francis Daly

Re: Redirection problem again in new rules.

2016-04-18 Thread Francis Daly
On Mon, Apr 18, 2016 at 06:37:59PM +0500, Muhammad Yousuf Khan wrote: Hi there, > Thanks alot Francis Daly :). the try_file option worked for me and location > tip also worked but try_file seems more better approach. I'm glad you got it working for you. > Btw, can you please explain this paragr

Re: Redirection problem again in new rules.

2016-04-18 Thread Muhammad Yousuf Khan
Thanks alot Francis Daly :). the try_file option worked for me and location tip also worked but try_file seems more better approach. Btw, can you please explain this paragraph. actually i am really sorry for this newbie type question. actually i have been working as ssytem admin for last 5 years.

Re: Redirection problem again in new rules.

2016-04-16 Thread Francis Daly
On Sat, Apr 16, 2016 at 12:22:46PM +0500, Muhammad Yousuf Khan wrote: Hi there, > location ~ \.php$ { > location ~* > \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|woff|woff2)$ >

Re: Redirection problem again in new rules.

2016-04-16 Thread Muhammad Yousuf Khan
Here is our nginx default configuration file. server { server_name www.mydomain.com; return 301 $scheme://mydomain.com$request_uri; } server { server_name mydomain.com; #listen 80; root /var/www/html/mydomain/public_html; index index.php info.php; access_log /var/log/nginx/mydomain/access.lo

Re: Redirection problem again in new rules.

2016-04-15 Thread Francis Daly
On Fri, Apr 15, 2016 at 12:27:11PM +0500, Muhammad Yousuf Khan wrote: Hi there, > Sorry for the mistake in a's and b's i was typing that in general because > the context was not the URL but the problem. If you can show one specific url which does show the problem, then it makes it much easier to

Re: Redirection problem again in new rules.

2016-04-15 Thread Muhammad Yousuf Khan
Hi All, Thanks for your help. Ph. Gras and Francis for your support and advice i really appreciate that. Ph. Gras, i tried "break" but now it is showing 404. Francis, Sorry for the mistake in a's and b's i was typing that in general because the context was not the URL but the problem. >Do not

Re: Redirection problem again in new rules.

2016-04-14 Thread Francis Daly
On Thu, Apr 14, 2016 at 07:03:19PM +0500, Muhammad Yousuf Khan wrote: Hi there, > there are multiple apache redirection rules that were working successfully. > for example something like this > > Redirect 301 //bbb /a/bb.html > > Now i have converted this rule in nginx like this

Re: Redirection problem again in new rules.

2016-04-14 Thread Ph. Gras
Le 14 avr. 2016 à 16:03, Muhammad Yousuf Khan a écrit : > Redirect 301 //bbb /a/bb.html > > Now i have converted this rule in nginx like this > > location // { > rewrite ^(.*)$ //bb.html redirect; > } > You should use break instead redirect : http://n

Redirection problem again in new rules.

2016-04-14 Thread Muhammad Yousuf Khan
Hi, there are multiple apache redirection rules that were working successfully. for example something like this Redirect 301 //bbb /a/bb.html Now i have converted this rule in nginx like this location // { rewrite ^(.*)$ //bb.html redirect; } i also tr