SevenBC Posted October 5, 2008 Share Posted October 5, 2008 Ok.. I'm very very new to Mod Rewrite.. and I just started reading about it, but I'm pretty much lost.. haha First off, I'm not sure if I'll be able to use it, bcuz the pages that I want to "Rewrite" are receiving variables from other pages using the GET method.. Which, I luckily made it through that.. Let me show you examples of pages I want to rewrite.. They aren't using any ID Numbers.. they are using Strings.. which are important, bcuz these strings are used to pass information such as the header and other info that I do not want to lose.. Here is an example: 1.) http://www.sevenbeez.com/watchVideo2.php?id=/videos/e/16711680/wshhXIiiJ3CG68m53wJ1&name=Seal%20-%20A%20Change%20Is%20Gonna%20Come 2.) http://www.sevenbeez.com/listenAudio.php?path=mp3/The%20Fugees%20-%20Ready%20Or%20Not.mp3&name=The%20Fugees%20-%20Ready%20Or%20Not 3.) http://www.sevenbeez.com/viewLyrics.php?file=lyrics/Carter3/mrcarter.txt&song=Mr.%20Carter These are very very very ugly looking links, I know.. but If I could somehow clean it up, without losing the functionality of passing the information, that would be great.. Is this Possible. and if so... HOW DO I DO IT? Please help! Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/ Share on other sites More sharing options...
SevenBC Posted October 5, 2008 Author Share Posted October 5, 2008 any help would be good. Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-657629 Share on other sites More sharing options...
corbin Posted October 5, 2008 Share Posted October 5, 2008 look into RewriteRule. Actually, now that I look at the URLs, it's going to be difficult to rewrite them because of the slashes in the GET variables x.x. Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-657646 Share on other sites More sharing options...
SevenBC Posted October 5, 2008 Author Share Posted October 5, 2008 Can you give me a starting point..? I've looked at the tutorials and everything for the rewriting.. I'm pretty much lost.. Can you give me an example of something that might kind of work, and I can tweak it from there.. Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-657675 Share on other sites More sharing options...
corbin Posted October 5, 2008 Share Posted October 5, 2008 The way your URLs are structured right now, it makes it difficult to rewrite them.... Err... Here's an example: RewriteEngine On RewriteRule ^/watch/(.*) watchVideo2.php [QSA] Just of curiosity, what does your goal URL look like? Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-657732 Share on other sites More sharing options...
SevenBC Posted October 6, 2008 Author Share Posted October 6, 2008 Maybe something like this.. http://www.sevenbeez.com/watchVideo/seal-change-gonna-come/ Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-657842 Share on other sites More sharing options...
corbin Posted October 6, 2008 Share Posted October 6, 2008 RewriteRule ^/watchVideo/([^/]+) /watchVideo2.php?name=$1 Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-657906 Share on other sites More sharing options...
SevenBC Posted October 6, 2008 Author Share Posted October 6, 2008 I added this rule, and it had no effect.. I even changed it around a bit, and it didn't alter the URL at all.. im wondering if im missing something very very simple.. I believe my server has mod rewrite capabilities bcuz, I already see other Rewrites within the .htaccess file.. Hmm.. I know that it says someting about adding a $ after the strong code, which I didn't see in the code that u gave me.. but I added that, and still nothing.. any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-657947 Share on other sites More sharing options...
SevenBC Posted October 14, 2008 Author Share Posted October 14, 2008 Anyone else have any helpful ideas? Please let me know.. Nothing I have tried has worked so far.. Please help! Quote Link to comment https://forums.phpfreaks.com/topic/127090-need-mod-rewrite-help/#findComment-664734 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.