formasfunction Posted May 20, 2007 Share Posted May 20, 2007 I have the following RewriteRule working within an htaccess file in the root directory of a site: <IfModule mod_rewrite.c> Options FollowSymLinks RewriteEngine on RewriteRule ^direct/(.+) /index.php?q=$1 [L] </IfModule> I'm trying to get it to work without the need to reference the directory "direct" on the first part of the rule and instead reference the root: RewriteRule (.+) /index.php?q=$1 [L] For some reason it's not working as expected. I know that if you're referencing the folder in which htaccess resides then you don't need the leading "/". Link to comment https://forums.phpfreaks.com/topic/52272-having-trouble-getting-rewriterule-to-work-with-root-directory/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.