Welcome! Log In Create A New Profile

Advanced

NGINX rewrite

Posted by redstonedesigner 
NGINX rewrite
June 13, 2020 12:42PM
I'm attempting to write a PHP application, and I'm not sure how to make the friendly URLs appear as "/category/abc.X/" where abc is a URL slug and X is an ID.
Ideally, I'd like to pass it to something like "category.php?id=X&$args"
Re: NGINX rewrite
June 19, 2020 10:34AM
Hi
Friendly addresses.
In Apche I used .htaccess and wni the entry
RewriteEngine On
RewriteRule ^ Home $ index.php? Str = home [L]
RewriteRule ^ Contact $ index.php? Str = contact [L].
On the page, the links looked like this:
<li> <a href="Home"> Home </a> </li>
<li> <a href="Contact"> Contact </a> </li>.
How to do it in Nginx?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready