.htaccess examples

Submitted by Anonymous (not verified) on Wed, 06/10/2009 - 01:40

redirect url with parameters

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} url_get_parameter_1=(.*)&url_get_parameter_2=(.*)
RewriteRule ^your/old/directory/file$ your/new/path/%1/%2 [R=301,L]

This code redirects :

example.com/your/old/directory/file?url_get_parameter_1=ALBUMS&url_get_parameter_2=HOLIDAY

to

example.com/your/new/path/ALBUMS/HOLIDAY

Force files to download (not be displayed in client/browser)


E-Mail validation with Java and regular expressions (regex)

Submitted by rex on Mon, 06/08/2009 - 23:53

With a few lines of code you can check if an E-Mail address ist valid or not. The most import part ist our pattern:

String pattern = "([a-z0-9_.-]+@[a-z0-9-]+\\.[a-z]{2,6})";

import java.util.regex.*;

public class EmailCheck {

	public static void main(String[] args) {

		String eMail = "youremailyoursite.com"; 
		
		String pattern = "([a-z0-9_.-]+@[a-z0-9-]+\\.[a-z]{2,6})";
		if(eMail.matches(pattern)){
			System.out.println("Your E-Mail address is valid");
		}else{
			System.out.println("You entered a not valid E-Mail address");
		}

	}

}

The account provided is ineligible for use with the option below. Please select another option.

Submitted by Anonymous (not verified) on Mon, 06/08/2009 - 23:00

Hello I want to transfer a domain to another account under Godaddy but I get this error: "The account provided is ineligible for use with the option below. Please select another option. " It is an existing -new- account. Why cant I change account owner/registrar easily? What is the reason for this error?

Internet for Beginners

Submitted by Anonymous (not verified) on Wed, 06/03/2009 - 00:05

I am going to give an internet/computer course for beginners. What are the most important points for newbies? What should an internet user know? Feel free to add your comments.

What is Internet (history, standarts, html, ...)

what is a search engine (google, yahoo, live, dmoz)

what is e-mail (webmail, popmail)

what is an instant messenger and how to use it (msn, yahoo messenger, icq, gtalk, skype)

what is a forum and how to use bulletin boards

what is a blog and how to open your own blog (wordpress, blogger)

Where can I sell my digital photos?

Submitted by Anonymous (not verified) on Sun, 05/31/2009 - 20:43

Hello
I am not a professional photographer but I want to sell some pictures online. I have no experience and I dont know where to start. I also dont know what are the requirements.

Where can I sell my photos?

How does it works?

Can I use normal digital cameras for digital photography? ie something around 5megapixel, 5mpx, 7mp etc.

How can I protect my images that not beeing stolen.

What kind of photos are the bestseller?

Why Google-PR gives Drupal 8, Joomla 9 and Phpnuke 5?

Submitted by Anonymous (not verified) on Sun, 05/31/2009 - 02:17

I just dont understand how Google-PageRank calculated. It is nor pure popularity either pure quality.

link:drupal.org 323,000		PR 8
link:joomla.org 635,000		PR 9
link:phpnuke.org 452,000	PR 5
link:postnuke.com 1,110 PR 8

Phpnuke has more backlinks than Drupal but very low PR
Drupal is more professional than Joomla but lower PR
Postnuke ended at 2008 but still have PR 8