Please, some simple guidance before I go crazy

New to mod_rewrite? This is a good place to start.

Please, some simple guidance before I go crazy

Postby matakaku » Fri Jun 25, 2010 6:27 pm

Please help me understand...

my .htaccess file is filled with about 100 lines of "tries" (with # in front of them) but... it ain't working! I have done the tests and I know my mod_rewrite is working,
for example:
I created 2 files rewrite_old.php and rewrite_new.php then put this in my .htaccess >

RewriteRule ^rewrite_old\.php$ /OneBigBlob/web/rewrite_new.php [R]

when I type rewrite_old.php in the address bar it takes me to the new page. Ok, it works, I get this.

However, people keep talking about "Clean" URLs and that's what i can't get...

Say I have a button on my site with the link:
http://www.onebigblob.com/ppages/v0001. ... genumber=1

what I want is when somebody clicks that link to show:
http://www.onebigblob.com/ppages/24173426/1
OR even
http://www.onebigblob.com/24173426/1
in the address bar...

I tried:
#RewriteRule ^ppages/(.*)/(.*)$ /ppages/v0001.php?userid=$1&pagenumber=$2
and about a hundred other things but has no effect on the address bar text.

After reading... I'm getting the feeling that query string links can't be "clean" URLed? do you have to START with a clean URL like:
http://www.onebigblob.com/ppages/24173426/1
and THEN the mod_rewrite will read it as:
http://www.onebigblob.com/ppages/v0001. ... genumber=1

I want to do the reverse... after a "dirty" URL query string is clicked... to show in the address bar a "clean" URL... isn't that what mod_rewrite does... aa... confused, please help
matakaku
 
Posts: 5
Joined: Wed Feb 18, 2009 3:39 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 9 guests

cron