I hope someone can help me. I have a simple mod rewrite issue but i can't get it to work. if someone goes here -> www.google.com/see/thispage I want to convert it to wwww.google.com/see/index.php?id=thispage so i can use some php to get the "thispage" variable. my index.php file is sitting in www.google.com/see (so it's NOT in the root dir).
This one's not too hard. Put this in your .htaccess file and this should do it: RewriteEngine on RewriteRule ^see/(.*)$ /see/index.php?id=$1 [NC,L] Code (markup): If you need more help with .htaccess and mod_rewrite, here's a good .htaccess and mod_rewrite reference.
2 questions: Is "see" a subdomain? If you're using see.yourdomain.com, then the .htacess would need to be in the "see" folder. If not a subdomain, what folder is your .htaccess in? That will affect your .htaccess commands.
1. it's not a subdomain, its a regular folder. 2. that is indeed a good one. the .htaccess was sitting in the /see folder, now i moved it to the root dir and i'm getting a 500 internal sever error.
Thanks Nintendo that one does it but i'm almost there now. Now I get everything except the last character of the variable. For example www.google.com/see/thispage produces this wwww.google.com/see/index.php?id=thispag instead of this wwww.google.com/see/index.php?id=thispage I'm reading now on how i can get it all, hopefully i can figure it out. edit: got it --> ([^.*]+)
(.*) is everything, so with RewriteRule ^see/(.*)$ /see/index.php?id=$1 [NC,L] even see/index.php?id=whatever whould make it go bonkers. To apache the original URL would also be a fake URL.