I’m trying to do the following : redirect ANY folder the user access to the root index and including the folder name in the url parameter.
For instance , if users acces www.site.com/200 , it will redirect to www.site.com/index.php?folder=200
The 200 folder does not exists, i just want the index.php to handle what user inputs as folder.
Here is what i tried :
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ ../index.php?folder=$1 [L]
Somehow it’s not working, i get a 404 instead.
2
Answers
I think the relative path is throwing it off; try:
Try this