I got stuck at this point here, and I'm breaking my head trying to figure out why its not working!
This is want to get the url to look like
example.com/news/top/
from
example.com/index.php?view=news&task=top
but i need it that way that "task" can be something diffrent like
example.com/index.php?view=news&task=newest
example.com/index.php?view=news&task=help
example.com/index.php?view=news&task=write
....
current .htaccess looks like:
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/([^/\.]+) index.php?view=$1&task=$2
If I visit www.example.com/news/ -> it only loads the index.php but does not pass ?view=news
If I visit www.example.com/news/top/ -> it works just fine.
But I need them both to work, adding a new line to .htaccess like :
RewriteRule ^news/ index.php?view=news
then visiting www.example.com/news/ works fine, but visiting www.example.com/news/top/ it will not be possible to get the value of task.
Please help me!
Thank you in advance.