Mod Rewrite Help

I was going to search the forum but i think its kind of like searching for a needle in a forest.

so…

I’m trying to get this result
www.domains.com/en
from
www.domains.com/index.php?lang=en

i get page not found … i’m assuming the server is looking for a directory.

i can get www.domains.com/en.html to work though. but i need /en

is it possible?

It is possible. Could you post what you tried so far so we can see where you went wrong?

Shay,

Hold on! That’s YOUR job as a webmaster to create your links as you’d like your visitors to see AND to create the mod_rewrite code to convert back to the format which Apache can serve!

If you need more information to achieve understanding, start with the tutorial link in my signature as it was developed from years of answering similar questions about mod_rewrite.

Regards,

DK

this is what i have
RewriteRule ^([^/]+)*.html$ /name.php?lang=$1 [L]
works fine with domain.com/en.html

when i take the html out
RewriteRule ^([^/]+)*.html$ /name.php?lang=$1 [L]

i get internal server error

Dklynn. I read your article a while back… it helped me alot with a different project i was working on.

Let’s try the most basic version of that rule first without all that regex in there:


RewriteRule ^/?en$ name.php?lang=en [L]

Does that work?

lol yeah… wow… i swear i did that… maybe i over looked something.

Thanks for the help :slight_smile: