Click to See Complete Forum and Search --> : htaccess help


ncsflorida
08-31-2011, 07:45 PM
I'm new to htaccess and need a little help.

I need to rewrite domain.com/dir1/dir2/htmlfile.html

I need to get the name of dir1, dir2, & htmlfile via php. Can someone provide the an htaccess file that will pass the variables to

domain.com/index.php?dir1= ..... etc.

Thanks

el07694
08-31-2011, 08:20 PM
Hi man,


Options +FollowSymlinks
RewriteEngine on
RewriteRule ^([^/]+)/([^/]+)/htmlfile.html domain.com/index.php?dir1=$1&dir2=$2 [NC]

Something like this..
I hope will be usefull!