php - .htaccess redirection with only parameters
Get the solution ↓↓↓Solution:
I am not sure if i understood what you want but you can try this, in your htaccess file add this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 ^c_
RewriteRule ^([^/]+)$ product-categories.php?category=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 ^c_
RewriteRule ^([^/]+)/([^/]+)$ product-categories?category=$1&product=$2 [L,QSA]
Your categories should start with c_ in this case (you can change it as you want). Thats all what i can help for now. Hope that you already solved it.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: foreign key constraint is incorrectly formed laravel
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.