...

View Full Version : New to mod_rewrite



cynikalsam
01-06-2005, 02:15 AM
As far as i know, mod_rewrite can do this..

Say for example, i have a page at
http://www.mysite.com/folder/page.php and i want to use it as my main index, so people will see it when they enter
http://www.mysite.com/

I dont want any other pages in the /folder/ directory affected.

Can .htaccess mod_rewrite do that? And if so, how?

cfc
01-06-2005, 08:11 PM
I don't have any experience with mod_rewrite personally, but these links should prove useful (it was a 2-minute google search for the keywords: "mod_rewrite"+"url"):

Official apache documentation of mod_rewrite:
http://httpd.apache.org/docs/mod/mod_rewrite.html

Apache URL rewriting guide:
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

Another (less complicated) guide to URL rewriting with mod_rewrite:
http://powersitesystem.com/article1.html


The third will probably prove the most useful if you are just looking for a simple guide to URL rewriting and aren't too experienced with configuring apache or have little interest in getting very deep into the functions of mod_rewrite

Noodles24
02-08-2005, 02:03 AM
Here, you can use this:

RewriteEngine On
RewriteRule ^index.php /folder/page.php

And assuming the index.php is the default page when someone goes to http://yoursite.com/ it will look like they're at /folder/page.php

If you want to redirect them there just add a [R] on the end



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum