techcone Posted January 25, 2010 Share Posted January 25, 2010 I want to mod rewrite http://www.abc.com/watch?v=xxxxxxxxxxxx to http://www.abc.com/index.php?url=xxxxxxxxxxxx Please suggest me possible htaccess file. Regards. Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/ Share on other sites More sharing options...
JAY6390 Posted January 25, 2010 Share Posted January 25, 2010 RewriteEngine On RewriteBase / RewriteRule ^watch\?v=([^&]+) /index.php?url=$1 [L] That should do it Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001389 Share on other sites More sharing options...
techcone Posted January 25, 2010 Author Share Posted January 25, 2010 RewriteEngine On RewriteBase / RewriteRule ^watch\?v=([^&]+) /index.php?url=$1 [L] That should do it Nopes not working buddy. Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001391 Share on other sites More sharing options...
techcone Posted January 25, 2010 Author Share Posted January 25, 2010 Another example http://5outube/watch?v=KmkuzoW82wo to http://5outube/index.php?url=KmkuzoW82wo Error I am getting in error log : File does not exist: C:/xampp/htdocs/5outube/watch Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001393 Share on other sites More sharing options...
JAY6390 Posted January 25, 2010 Share Posted January 25, 2010 Try putting a / after the ^ in the rewrite rule Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001397 Share on other sites More sharing options...
techcone Posted January 25, 2010 Author Share Posted January 25, 2010 Try putting a / after the ^ in the rewrite rule Tested that too buddy. Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001398 Share on other sites More sharing options...
JAY6390 Posted January 25, 2010 Share Posted January 25, 2010 If you're getting that error in your logs it sounds like your rewrite module isn't enabled, or your file isn't named .htaccess - The . needs to be there Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001402 Share on other sites More sharing options...
techcone Posted January 25, 2010 Author Share Posted January 25, 2010 Well it is working since I tried to make my own, it will giving results. But the solutions you gave are not really working. Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001405 Share on other sites More sharing options...
techcone Posted January 25, 2010 Author Share Posted January 25, 2010 Might be useful for someone. Options +FollowSymlinks RewriteEngine On RewriteCond %{QUERY_STRING} v=(.*) RewriteRule ^watch(.*) /index.php?url=%1 Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001413 Share on other sites More sharing options...
Maq Posted January 25, 2010 Share Posted January 25, 2010 Glad to see it working. We actually have a Mod Rewrite section, I'll move it there for you. Quote Link to comment https://forums.phpfreaks.com/topic/189756-mod-rewrite-problem/#findComment-1001416 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.