I got a totally dynamic website, and to improve my search engine
results, I would like to use mod rewrite.
From what I've understood so far, I have to put the necesarry lines
into my htacess file, right?
Anyway, I read some tutorials, but I can't quite grasp how to
do it in my case -
I have an url like that:
www.url.com/index.php?page=folder1/subfolder2/subfolder3/
and I want it rewritten to:
www.url.com/folder1/subfolder2/subfolder3/
How can I get this done?
Thanks,
Stefan
RewriteRule ^/(*)$ /index.php?page=$1
In other words, in the original URL match everything after the / and
call it $1. Then in your re-written URL you just use the $1 to
represent the pattern that was matched.
u can't rewrite it to an url like
www.url.com/index.php?page=folder1/subfolder2/subfolder3/?variable1=value1&variable2=value2
Can you?
Or should it be something like
www.url.com/index.php?page=folder1/subfolder2/subfolder3/index.php?variable1=value1&variable2=value2
Or how should it be done the best way possible for search engines?
Cheers,
Stefan
ZeldorBlat schrieb:
And your PHP question is?????
P.S. Please don't top post.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================
heres what i use
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?page=$1 [L,QSA]
It checks if the url is a dir or a file & then it rewrites it with the
extra querystring.
good luck