Search Results

Search found 2 results on 1 pages for 'detusueno'.

Page 1/1 | 1 

  • Nginx rewrite for link shortener + Wordpress pretty URLs

    - by detusueno
    Okay so I installed Nginx/PHP/MySQL/Wordpress via a online walk through, and it had me enter these rewrites to enable Wordpress pretty URLs: if (-f $request_filename) { break; } if (-d $request_filename) { break; } rewrite ^(.+)$ /index.php?q=$1 last; error_page 404 = //index.php?q=$uri; This is then included in the vhost for my domain. What I'm trying to do now is add some redirection/link shortner rewrites that will play nice with the setup I have in mind. I'd like to redirect "x.com/y" to "x.com/script.php?id=y" for all external links that I post. The Wordpress link setup right now has almost all internal links begin with "news" (x.com/news/post-blah, x.com/news/category/1, etc) BUT I also have a few root links that point to some internal content (x.com/news, x.com/start). I'm guessing that's going to cause some conflicts. What's the best approach to do this? I've never worked with Nginx (or any rewrite rules) but maybe I can distinguish between "x.com/news" and "x.com/news/" to allow it to play nice? I had a friend setup a working version of this in Apache and it'd be nice if I could get this up on Nginx again.

    Read the article

  • Nginx rewrite for link shortener and Wordpress

    - by detusueno
    I'm a complete newbie to Nginx, so much so that I followed a online guide to do most of my server setup. I'm trying to learn but I'm still a ways away from understanding it all. So what I'm trying to create is a link shortener that redirects (example.com/x) to (example.com/short.php?id=x). Keep in mind that I'm also running a Wordpress blog on the same domain and plan on using the redirects/shortening for external links. The guide has so far had me add the following rewrites to enable Wordpress pretty URLs: # WordPress pretty URLs: (as per dominiek.com) if (-f $request_filename) { break; } if (-d $request_filename) { break; } rewrite ^(.+)$ /index.php?q=$1 last; # Enable nice permalinks for WordPress: (as per Yawn.it) error_page 404 = //index.php?q=$uri; And if it matters any, it was saved at (/usr/local/nginx/conf/wordpress_params.regular). Additionally, my Wordpress link structure adds "news" to all internal links (example.com/news/post-blah, example.com/news/category, ect.). What's the best way to tackle this setup?

    Read the article

1