Tuesday, November 15, 2005

guess who's back

so you thought you had me huh? And i was gone for good? well... i'm back.

Seriously though, a lot of things has been going thru my mind this last
weeks, and I thought it was better i sort them out before i went on with
bloggin as usual.

Anyways... now, i'm back bloggin. And for a first taste, i've been
playing with mod_rewrite for apache.. and DANG!!! Its sooo cool.

More on that later.

Essien, out!!!

5 Comments:

At Tuesday, November 15, 2005 11:31:00 PM, Anonymous Anonymous said...

hey Essien... how you dey. i played with mod_rewrite recently but i didn't have much time to disect it well enough.

Quick question....

Can you rewrite a folder path on the webserver such

http://mywebsite.com/abc to

http://abc.mywebsite.com.

if you have encounterd and solved this riddle please do let me know

 
At Wednesday, November 16, 2005 10:16:00 AM, Blogger Essien Ita Essien said...

Bros... how far? :)

Actually, I've done something like this very recently. What i did was this.

I wrote a rule to rewrite http://mywebsite.com/foobar.html to instead call
http://mywebsite.com/ascript.php

Now in ascript.php, i proceed to do what ever i like with the URL. In my case, what i did, was to intercept subdomains such as subdomain.mywebsite.com, and fetch them from apache_document_root/mywebsite.com/subdomain/foobar.html

then for file that didn't exist, i used PHP to redirect to another existing page.

That's what I did. I'm still new to mod_rewrite, so i'm not still sure of everything you can do with it, but i'm sure http://mywebsite.com/abc can be translated to pure abc.mywebsite.com using purely mod_rewrite without the PHP trick i employed. I'll play more with it, and post back here what i find.

Hope that helps.

Cheers,
Essien

 
At Wednesday, November 16, 2005 4:17:00 PM, Blogger Essien Ita Essien said...

I have an updated post on this issue here: http://essiene.blogspot.com/2005/11/modrewrite-voodoo.html

Enjoi :)

 
At Thursday, November 17, 2005 3:23:00 PM, Blogger Mfoniso said...

Ahhh. you're finally back blogging. Good.

 
At Monday, February 26, 2007 1:27:00 PM, Anonymous okoji said...

Guy, abadie? I just breezed across and read your code rewrite jargon. I'm a fine artist/teacher. What's your take on signonafrica.com. I'm thinking of making them my site hosts. post me a comment at www.frienster.com/brainwaver or simply Email krazyfela@yahoo.com

 

Post a Comment

<< Home