YeuSeChia YeuSeChia - 2 months ago 4
PHP Question

How to re-write the link, with `.htaccess`, in a sub-folder?

I I have this website, with this structure:
. Now, I want to edit this link to:

So, I put an
; there is content:

RewriteEngine On
RewriteRule ^/?-/([0-9]+)$ /index.php?id=$1

Unfortunately, it always shows:
Error - 500

What is wrong with my

My question is not duplicated with any existed question ...


According to your request, this is your server structure:

"/" (root)
|___ "-" (directory)
|___ .htaccess
|___ index.php

Before you make a .htaccess file, please check your server configuration.

RewriteEngine On
RewriteRule ^([0-9]+)$ ?x=$1