Drongo_III Posted September 13, 2012 Share Posted September 13, 2012 Hi Guys I hardly ever touch mod rewrite so I am stuck on something very simple. I am using a htaccess file and mod rewrite so that if someone targets a particular url (which is acutally a directory) they will be served a specific file in the directory but the new url will have a query string defining where they came from. So can anyone tell me why this doesn't work please? RewriteEngine On RewriteRule /tester http://localhost/HTACCESS/tester/tester.php?source=google As i said, the goal is if someone hits up my site on the directory '/tester' I want them to be servered a specific file in that directory - i.e. tester.php with a query string. What am i doing wrong? Oh and incidentally when i say it 'doesn't work' specifically I am just getting the directory listing for the 'tester' directory. Quote Link to comment Share on other sites More sharing options...
carbide20 Posted September 23, 2012 Share Posted September 23, 2012 Try: Options +FollowSymlinks Just before RewriteEngine On. +FollowSymLinks must be enabled for any rules to work, this is a security requirement of the rewrite engine. Normally it's enabled in the root and you shouldn't have to add it, but it doesn't hurt to do so. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.