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
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:
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
RewriteRule (.*)/main(.*) $1$2 [QSA]
09-11-2005, 08:59 PM
Yep, that did it. Thank you!
EDIT: Only the first one did it, the second didn't
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.