Jump to content

Recommended Posts

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 :)
Link to comment
https://forums.phpfreaks.com/topic/15951-mod_rewrite-for-multiple-files/
Share on other sites

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 available

Now 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 > Save
In 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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.