darkcarnival Posted July 29, 2006 Share Posted July 29, 2006 hi,i want to use mod_rewrite for a site of mine to make it easier for my users to find pages(i have lots of pages)basically the thing is i have 2 differnt files i want to do this with. opne is a biography page, another is a album detail page.now this may sound dumb to those who know how to do but do i have to make another .htaccess file for that or place it in the same one?also something real quick, im testing this on my windows server(it has apache) im wondering if someone knew of a windows-based tutoiral for setting up mod_rewrite on apache as the one found on this site looks like its for linux.thanks :) Quote Link to comment https://forums.phpfreaks.com/topic/15951-mod_rewrite-for-multiple-files/ Share on other sites More sharing options...
wildteen88 Posted July 30, 2006 Share Posted July 30, 2006 To setup mod_rewrite in windows. You need to open httpd.conf and find:[code]#LoadModule rewrite_module modules/mod_rewrite.so[/code]Now remove the # infront of that line. Save the httpd.conf file and restart Apache, mod_rewrite is now availableNow when you want to use mod_rewrite you'll want to create a .htaccess file inside in the folder which you want to perform the rewrite rules, the Following is what you'll need to place inside the .htaccess file:[code]RewriteEngine On[/code]To turn on the rewrite engine, after that you put your rewrite rules etc.To create an .htaccess file in Windows, you'll want to open up Notepad. Then goto File > SaveIn the filename type in .htaccess. Now underneath the filename box, make sure the file type is set to All Files and not Text File. Now click save. Quote Link to comment https://forums.phpfreaks.com/topic/15951-mod_rewrite-for-multiple-files/#findComment-65799 Share on other sites More sharing options...
darkcarnival Posted July 30, 2006 Author Share Posted July 30, 2006 ok that helps a bit :)now hres something to ask, the files i wish to do this to are in the same folder, will that have to change? Quote Link to comment https://forums.phpfreaks.com/topic/15951-mod_rewrite-for-multiple-files/#findComment-65974 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.