Category Archives: Notes

How to install and use djbdns name server on Ubuntu 6.06 LTS

I do not issue any guarantee that this will work for you!!!
btw. it’s working for me :p …

Nginx rewrite config for ArticleLive

Nginx rewrite rules for ArticleLive: if (!-e $request_filename) { rewrite ^/categories(.*)$ /categories.php?$1 last; rewrite ^/articles(.*)$ /articles.php?$1 last; rewrite ^/pages(.*)$ /pages.php?$1 last; rewrite ^/blogs(.*)$ /blogs.php?$1 last; rewrite ^/news(.*)$ /news.php?$1 last; rewrite ^/authors(.*)$ /authors.php?$1 last; rewrite ^/search(.*)$ /search.php?$1 last; rewrite ^/articlerss(.*)$ /articlerss.php?$1 last; rewrite ^/contact(.*)$ /contact.php?$1 last; rewrite ^/blogrss(.*)$ /blogrss.php?$1 last; rewrite ^/newsrss(.*)$ /newsrss.php?$1 last; break; }

Running XtraUpload Under Nginx

Nginx rewrite rules for XtraUpload: if (!-e $request_filename) { # New Rewrite Rules for total site SEO rewrite ^/(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/index\.htm$ /$1.php?$2=$3&$4=$5&$6=$7&$8=$9&$10=$11 last; rewrite ^/(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/index\.htm$ /$1.php?$2=$3&$4=$5&$6=$7&$8=$9 last; rewrite ^/(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/index\.htm$ /$1.php?$2=$3&$4=$5$6=$7& last; rewrite ^/(.*)/(.*)_(.*)/(.*)_(.*)/index\.htm$ /$1.php?$2=$3&$4=$5 last; rewrite ^/(.*)/(.*)_(.*)/index\.htm$ /$1.php?$2=$3 last; # More New Rewrite Rules for total site SEO, with index.htm pagess at the end rewrite ^/(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/(.*)_(.*)/$ /$1.php?$2=$3&$4=$5&$6=$7&$8=$9&$10=$11 [...]

Nginx redirect www.example.com requests to example.com or vice versa

Add following configuration directive if you want to redirect www.example.com to example.com server { server_name www.example.com; rewrite ^(.*) http://example.com$1 permanent; } server { server_name example.com; Put here your domain hosting configuration. } Add following configuration directive if you want to redirect example.com to www.example.com server { server_name example.com; rewrite ^(.*) http://www.example.com$1 permanent; } server { [...]

Nginx and WordPress setup clean SEO friendly URLs

Open your nginx configuration file: # nano /etc/nginx/nginx.conf Locate your domain (example.com) virtual hosting configuration and before “location ~ \.php$ {” add following lines: if (!-e $request_filename) { rewrite ^(.*)$ /index.php?q=$1 last; break; } At the end your configuration should look as follows: server { server_name example.com; index index.php; root /var/www/example.com; if (!-e $request_filename) { [...]