I’m trying to make pretty URL for my gallery page.
Main page index.php gets url parameters tabl(table) and meno(name) to see which gallery to be visible.
I have a link to gallery.
<a href="https://onlinegallery.online/index.php?tabl='.$table.'&meno='.$jmeno.'">'.$table.'</a>
URL to show gallery.
https://onlinegallery.online/index.php?tabl=gallery&meno=admin
I need to get https://onlinegallery.online/gallery/admin
I spent a lot of time but all i write to .htaccess not working.
For example.
RewriteEngine On
RewriteRule ^tabl/meno/([0-9]+)/([^.]+)$ index.php?tabl=$1&meno=$2
May there be a problem with the php code inside index.php? Code is for redirect page if there is no variable inside url and is also the main page of my gallery page.
if(!isset($_GET['meno'])){
header('location: ' . 'https://onlinegallery.online/index.php?tabl=gallery&meno=admin');
exit;
}
2
Answers
WORKS
On page where need to send variables to URL
On index.php i had to change all links to full URL
Thank you all
https://onlinegallery.online/admin/gallery/
Are you saying you want to visit URL:
to get:
Where:
if that is the case