PDA

View Full Version : Mod_rewrite help!


djxcee
10-16-2008, 12:14 PM
My forum is currently located @ test.com/forum/
I want to make the url look like test.com/forum.html ?
Meaning it is in the main root folder but not the index.

Is this possible?

necris
10-18-2008, 08:06 AM
It seems easy, I haven't made the test my self but this rule or something very similar in the .htaccess might work for you.

RewriteRule ^forum.html(.*) forum/index.php$1 [L]

PD. I added the (.*) for the parameters also.
If you use CMPS or other things you will need aditional rules.

djxcee
10-18-2008, 08:14 AM
Where should I place this?
In the index or /forum/ ?

I tried both and it unfortunately doesn't seem to be working.

MoT3rror
10-20-2008, 07:14 PM
You need to turn on the rewrite engine with this code.

RewriteEngine On