View Full Version : htacess redirect?
initiald
06-05-2013, 09:03 PM
Hello, how do you write a redirect condition in htacess y if someone types in exactly http://www.example.com/folder/, it will redirect to exactly http://www.example.com/folder.php and not affecting any files inside the /folder?
Thanks
Brandon Sheley
06-05-2013, 09:50 PM
you can try
RedirectMatch 301 ^/folder/ http://www.mydomain.com/file.php
or try
RedirectMatch 301 ^/folder/ http://www.mydomain.com/forum.php
to send them back to forum home
Brandon Sheley
06-06-2013, 02:07 AM
am I going blind or is that the same thing I posted?..lol
John Lester
06-06-2013, 05:25 AM
am I going blind or is that the same thing I posted?..lol
Yup you're blind ... you put file.php he put forum.php :D
snakes1100
06-06-2013, 07:21 AM
Yea, kinda like posting at the .com, the support staff post right hours later after you help someone & post asking the same thing, i think they're getting paid by the post on support.
initiald
06-07-2013, 08:36 AM
you can try
RedirectMatch 301 ^/folder/ http://www.mydomain.com/file.php
Oh thanks.
Didn't realize adding / in front of folder works.
I have try RedirectMatch 301 ^folder/ http://www.mydomain.com/file.php and this doesn't work as to what I want. Thank you very much!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.