...

View Full Version : .htaccess mod_rewrite questions



karinne
03-20-2007, 05:02 PM
I tried looking at documentation on the mod_rewrite forums but this stuff is like chinese to me!

I'm trying to change my links from

http://www.karinne.net/archive/?bid=9

to something like

http://www.karinne.net/archive/make-your-html-efficient/

I don't even know where to start ... what to put in my .htaccess file.

Help!? Thanks!

ess
03-20-2007, 06:46 PM
Create a .htaccess file and place it in your document root. and add the following


ReWriteEngine on
RewriteBase /

# don't allow anyone to view your htaccess file
ReWriteRule \.htaccess [F]

RewriteRule ^(.*)/(.*)/$ /index.php?archive=$1&bid=$2 [L]



In your index.php, do the following


$archive = $_GET['archive'];

$bid= $_GET['bid'];

That should do the trick.

Cheers,
Ess

karinne
03-20-2007, 06:58 PM
Thanks ... I'll try that!

karinne
04-02-2007, 03:12 AM
Alright ... I finally had time to play with this but ... didn't work.

I still get stuff like http://www.karinne.net/archive/?bid=6 in my location bar



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum