PDA

View Full Version : .htaccess question


error_22
10-25-2006, 09:39 AM
I have this php script that displays the content of a db field.

the url looks like this: mod.php?do=some-name-here

for better URLs i have a .htaccess document with the following code:

RewriteRule ^/?([a-zA-Z\_]+)$ /mod.php?do=$1 [L]


so the url www.mydomain.com/some-name-here would point to www.mydomain.com/mod.php?do-some-name-here.

What I wanna do is: I want the URLs so look like this:

www.mydomain.com/some-name.here.html

How do I add that last ".html"?

Thanks in advance
Niklas

nico_swd
10-25-2006, 11:03 AM
Try this.

RewriteRule ^/?([a-zA-Z\_]+)\.html$ /mod.php?do=$1 [L]

error_22
10-25-2006, 11:54 AM
Wow you really are helpful!!

Tahnk you so much, and thank you so much for all the help with the template engine!!