Skip to Content

mod_rewrite

Anybody could notice that there are at least two urls that direct to this page. Originally, I registered for http://www.nattee.net/ and http://our.obor.us/. Both works well thanks to Drupal site configuration method. Drupal use name based resolution. All I have to do is to edit the setting.php to point to the same database for both of the name. Users can access my site using any of these urls and drupal simply direct it to the same place (because all information is stored in the database).

The problem is that the module from drupal that access these API does not allow me to authenticate with the API using different certificate for different host name. This is definitely not the bug of drupal because what I did in the first place is a workaround, not a recommended way. I personally says that the two urls use the same database which is originally intended to be used for single url.

The problem started when I was trying to use off-site module, e.g., Google Analytic, reCAPTCHA or mollom. These APIs require some security measurement. The APIs are available for the registered site only and they all adopt the name based identification. The method they adopt is that the RSA key is provided to the site owner and the site must supply the key when communicating with the APIs providers. Different keys are issued for different host name. In short, each call of this APIs must come from the correct URL.

RewriteCond %{HTTP_HOST} ^our\.obor\.us$ [NC]
RewriteRule ^(.*)$ http://www.nattee.net/$1 [L,R=301]

The first line simply matches the content of HTTP_POST variable with our.obor.us (using regular expression) as a first token. Then [NC] flag indicates that case is irrelevant. The second line simply match everything after the host name and prefixes it with http://www.nattee.net/. The $1 is back reference to the first line and [L,R=301] means that this line is the last rule to apply and apache should send the redirect command to the client.

That’s all.

Now, it came across my mind that mod_rewrite would solve the problem. mod_rewrite is an apache module rewrite the name of the url, perfectly what I want. After reading some document, all I need to do is to put these two lines on the .htaccess

Originally, I wish to solve the problem by redirecting anything from http://our.obor.us/ to http://www.nattee.net/. The problem is that GoDaddy won’t allow so, (they actually have this option but when I turned it on, nothing happens). For about a year after I adopt reCAPTCHA, nobody can post comment on http://our.obor.us/.

Comments

Today, buy cheap nike air max

Today, buy cheap nike air max shoes is the right choice is not only good for your health, but also is convenient for walking and running or training, so most people want to come home or give as a gift to their friends or family! Marking happier! They are really a nice addition this summer for wardrobe.Welcome to visit our website where they have a variety of nike air max 95, nike air max 2009, Nike Air Max Tailwind,nike free shoes for you to choose.Certainly all our products are for sale, new and free shipping.Wish has a good experience Purchase here.

Nike air max shoes continues and continues to keep the heat out chirning new colors of nike air max 90 each with more and more interesting than the last. This is called the mens nike air max 90 of the University of Akron and is based on official school colors. It will have a top that is predominantly blue color and are made of patent leather rand gold Flywire and a white swoosh is bordered by gold trim.

Welcome to visit our website,

Welcome to visit our website, where you will find kinds of mbt chapa gtx ebony offered at incredible wholesale prices.


mbt walking include allure and frolic. our family all like mbt walking

do you feel like the cheap ugg layback slipper to look cool, a very awesome website here.


so enjoy your shopping here and that’s our biggest wish!uggs classic mini


Discover the latest mbt shoes lami and purses.


world cup jersey offer great variety, style and color.

30 JULY LRR Hester prynne

30 JULY LRR Hester prynne was brought back to jail JiLing after exposure to see her doctor’s UGG Classic Short identity, but Hester prynne refused to tell who is the father of the child, and she said to her JiLing stein from him there had never feel love UGG Bailey Button, JiLing ward, threat Hester prynne don’t reveal their relationship, he cannot suffer an unfaithful woman’s husband to suffer humiliation, otherwise, he will let her lover, ruin your reputation is not only his reputation, status UGG Classic Tall, and even his soul and life, Hester prynne promised. Hester prynne after prison, with his daughter by needle little pearl maintains life skills, solitary, the red A word will humiliation at the Hester prynne. Little pearl grow beautiful refined,UGG Boots Sale with stubborn disposition and abundant energy, she and the scarlet letter before the shine in the pilgrims, they are in the society, but also the symbol of UGG Classic Cardy shame only if they are bright. http://www.officalugg.com/products_all.html

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Allowed HTML tags: <pre> <span> <div> <p> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h1> <h2> <h3> <h4> <hr> <div> <img> <blockquote> <pre> <br> <table> <tr> <td> <th> <thead> <tbody>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • LaTex commands embedded in text will be interpreted and rendered. Additional information can be found at DruTex Documentation Pages
    • Provides different environments to create rendered images (especially maths).
    • Line and paragraphs break automatically.
    • Assists automatic numbering of tex, equation, and equations environments.
    • Images can be added to this post.
    • Adds typographic refinements.

    More information about formatting options

    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.