Welcome to WebmasterWorld Guest from 54.226.46.6

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess functionality on IIS? Need to do the following:

     

cobradude

3:43 am on Jan 5, 2003 (gmt 0)

10+ Year Member



I run a forum (.php) which I am trying to archive so that google will crawl it properly. The scripts change things from .php to .html, but requires a little something in a .htaccess file:

<Files topic>
ForceType application/x-httpd-php
</Files>
<Files forum>
ForceType application/x-httpd-php
</Files>

I believe this just makes the file "topic" and "forum", which have no extension, to execute as php. Is there a way I can do essentially the same thing with IIS?

DaveAtIFG

7:11 am on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey cobradude we're not ignoring you, honest! Welcome to WebmasterWorld! :)

I speak a little Apache but unfortunately, no IIS. I will try to round up a little help for you though. Stay tuned! ;)

Dreamquick

8:37 am on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Question would you be happy to have fixed URLs like this;

www.example.com/topic or www.example.com/subdirs/topic

www.example.com/forum or www.example.com/subdirs/forum

or do you want to be able to have those extensions available if entered at the end of any URL within your site?

The reason I ask is that if you just want a fixed URL for each item then simply create a sub-directory with a default document, that way "www.example.com/topic" will work even though in reality it is "www.example.com/topic/default.php"

- Tony

IanTurner

1:10 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Administrator ianturner is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I am not sure what you are trying to do cobradude, I don't understand exactly what .htaccess does, and though I know something about how to clean URLs in IIS I need to know in more detail what you are trying to do in order to give you an answer.

DaveAtIFG

3:34 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For clarification, from the Apache docs:

The <Files> directive provides for access control by filename.

The ForceType directive forces all matching files to be served as the content type given by media type. For example, if you had a directory full of GIF files, but did not want to label them all with ".gif", you might want to use:


ForceType image/gif

Note that this will override any filename extensions that might determine the media type.

korkus2000

4:19 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Yes you can perform mod rewrites with an ISAPI filter in IIS. I don't know of any free ones but if you search for asp url rewrite you will find several solutions.

cobradude

4:29 am on Jan 7, 2003 (gmt 0)

10+ Year Member



DaveAtIFG, thanks for digging in on the documentation.

korkus2000, I'll do a search for that, thanks.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month