Forum Moderators: phranque

Message Too Old, No Replies

.htaccess rewrite and an error message

         

Mike521

10:31 pm on Mar 24, 2005 (gmt 0)

10+ Year Member



hi all, just looking for some help with .htaccess. I hardly ever use this file so I'm not very good with it.

I have a site that uses a perl script for auctions (every auction, if you're familiar with it).

it's accessed via site.com/cgi-bin/auction.pl

and often has URL parameters.

I'd like to make it simple for the visitors to remember -- something like site.com/auctions/

so I'd like to use htaccess to make this happen. can anyone give me some info on how to do this? all I've done with htaccess up until now is 301 redirects and 404 pages.. also will there be a huge problem with the trailing slash? if I make it site.com/auctions -- what will happen if someone goes to site.com/auctions/? or if the search engines tack on the trailing slash themselves (I believe yahoo does this)

also I tried just turning on the rewrite engine via

RewriteEngine on

when I went to the homepage it said I don't have permission to access it or something... do I have to get in touch with our server guy to have something turned on?

sitz

11:32 pm on Mar 24, 2005 (gmt 0)

10+ Year Member



You may, yes. mod_rewrite requires that the 'FileInfo' option to the 'AllowOverride' be active in the directory containing your content.

Mike521

3:08 am on Mar 25, 2005 (gmt 0)

10+ Year Member



I think that just confused me about twice as much as I was before lol... any other help or tips would be appreciated

jdMorgan

4:41 am on Mar 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mike521,

You will need AllowOverride FileInfo Options in httpd.conf and Options +FollowSymLinks in httpd.conf or in .htaccess--at a minimum--in order to be able to run mod_rewrite. If you do have a "server guy," it would be a good idea to ask him about this.

After that, you'll need a RewriteRule (see mod_rewrite documentation link in our forum charter [webmasterworld.com]) to rewrite requests for "site.com/auctions/" or "site.com/auctions" to your script.

Jim