Mod_rewrite to a different folder

Hi i want to be able to mod_rewrite the path to a forum in my htaccess-file.

The forum software originally is in http://www.mydomain.com/etc/forum/
But I want to be able to call the forum like this: http://www.mydomain.com/forum/

So basically it means creating a symlink, in order to skip a folder.
How can this be accomplished?
Phila007Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rscarvalhoCommented:
RewriteBase /
RewriteRule /etc/forum(/.*)? - [L]
RewriteRule /forum(/.*) /etc/forum/$1 [QSA,L]
0
Phila007Author Commented:
Hmm... doesn't work... file not found! But the content is in that folder...

I've found a way though (which works but not quite to my satisfaction:

RewriteRule ^forum(.*) /etc/forum$1 [L]

this works if I call the URL http://www.mydomain.com/forum/
but not if I call it without tha last slash: http://www.mydomain.com/forum
0
rscarvalhoCommented:
Try this:

RewriteRule /forum /etc/forum [QSA,L]
RewriteRule /forum/(.*) /etc/forum/$1 [QSA,L]
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Phila007Author Commented:
Nope, now it doesn't even work both ways...
0
Phila007Author Commented:
Anyone?
0
svenarildCommented:
Give this a try:

RewriteEngine on

RewriteRule ^forum$ etc/forum/ [L]
RewriteRule ^forum/(.*)$ etc/forum/$1 [L]
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Phila007Author Commented:
Nope. Both don't work. Either with or without the slash it doesn't work.
0
Phila007Author Commented:
This one is still the best bet:

RewriteRule ^forum(.*) /etc/forum$1 [L]

I just need one to work without the slash now!
0
Phila007Author Commented:
Sory my fault. This one works! I actually had another conflicting rule.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.