rndilger
07-18-2007, 03:14 PM
Hello. I have a quick question regarding url rewriting. I've been successful at using regular expressions in the past, but this one (though simple) has me stumped.
I'd like to make links throughout the site look like this:
http://www.indianasheep.com/membership
However, the php file is actually located at:
http://www.indianasheep.com/pages/membership.php
Thus, a simple redirect is in order, but I'm unable to get the syntax correct. Here is what I currently have:
RewriteRule ^([A-Za-z]+)?$ /pages/$1.php
And the .htaccess file is located in the pages directory.
Can anyone provide assistance?
Thanks,
Ryan
I'd like to make links throughout the site look like this:
http://www.indianasheep.com/membership
However, the php file is actually located at:
http://www.indianasheep.com/pages/membership.php
Thus, a simple redirect is in order, but I'm unable to get the syntax correct. Here is what I currently have:
RewriteRule ^([A-Za-z]+)?$ /pages/$1.php
And the .htaccess file is located in the pages directory.
Can anyone provide assistance?
Thanks,
Ryan