View Full Version : Apache rewrite

09-10-2005, 09:26 PM
Can someone help me with this. Ok my current Address to the main part of my site is http://www.blahblah.com/main/index.php?pg=blah What can I do to make it be http://www.blahblah/index.php?pg=blah. What is the htaccess stuff I need to do?

09-11-2005, 01:54 AM
RewriteEngine On
RewriteEngine on
RewriteRule ^/main/$ / [QSA]correct me if i'm wrong

09-11-2005, 12:51 PM
That doesn't do it

09-11-2005, 05:48 PM
If you want to get rid of the /main/ for every request use this:

RewriteEngine On
RewriteRule ^main - [L]
RewriteRule ^(.*)?$ /main/$1 [QSA]

All files and folders must then be inside /main/ though (other than this .htaccess file).

09-11-2005, 08:58 PM
RewriteEngine On
RewriteRule (.*)/main(.*) $1$2 [QSA]

Try that.

09-11-2005, 08:59 PM
Yep, that did it. Thank you!

EDIT: Only the first one did it, the second didn't

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum