Forum Moderators: phranque
I'm sure somebody smarter than me can help me with my problem.
I want to make available a certain amount of my pages on my website for search engines. I do not want them all to be available, so I will personally choose the pages and compile the static links in one page - eg profiles.html
I would like to set out the chosen links as follows:
STATIC
www.mysite.com/profile_5.html
on accessing this page, I want it to go to
DYNAMIC
www.mysite.com/index.php?page=view_profile&id=5
I think the only variable is the id number of the profile.
I have tried to use mod_rewrite with .htaccess - i know the code below isn't right, but i don't know what would have to be changed.
RewriteEngine on
RewriteRule ^profile_(.*).html index.php?page=view_profile&id=$1
Any assistance on this particular matter would be greatly appreciated.
Welcome to WebmasterWorld [webmasterworld.com]!
> i know the code below isn't right
Your code is not perfect, but it should work. Why do you think it isn't right?
Jim
Glad to hear it worked. I didn't understand why there might be a problem...
Tweaking it just a bit:
RewriteRule ^profile_(.*)\.html$ /index.php?page=view_profile&id=$1 [L]
Jim