-1

I need to get this URL /index.php?side=forside to look like this /forside/ and still get the contents from my includes folder to my index page.

How can I do this with an .htaccess file? I already read a lot of other questions and answers on the topic, but they don't work or the change my URL to ex. /side/forside or /side/forside.html and that is not what I want...

I have tried this:

Options +FollowSymLinks
RewriteEngine on
RewriteRule index/side/(.*)/ index.php?side=$1

But when I remove the index/side/ it doesn't work?

cmorrissey
  • 8,493
  • 2
  • 23
  • 27

1 Answers1

0

If it's just one side you have, it seems logical to use:

RewriteRule ^forside/ index.php?side=forside

If you have a lot of sides; you could use:

RewriteRule ^([a-z]+)side/ index.php?side=$1
Sjon
  • 4,989
  • 6
  • 28
  • 46