Htaccess redirect url with database id

174
March 18, 2018, at 11:55 PM

I want to redirect this url for each NUMERO in my database:

https://www.website.com/post.php?id=NUMERO

with

https://www.website.com/NUMERO

where NUMERO is the id of a cell in my sql database. For example:

https://www.website.com/post.php?id=7

https://www.website.com/7

To do the redirect I have added in my htaccess file this line:

RewriteRule ^/([0-9]+)/?$ post.php?id=$1 [NC,L] 

But it does not work and I don't undestand why.

Can anyone help me ?

READ ALSO
Selecting a same column from two different tables in sql

Selecting a same column from two different tables in sql

I have made two tables in a database : Table:Users and Table:Cars

147
sort column 2 by interval and sort column 1 desc

sort column 2 by interval and sort column 1 desc

I need a SQL statement where it first sorts by a interval of 1000 Hours steps and after that sorts the Points in DESC orderI cant figure out how to use Case or Between/case in this example

185
How to output a mysql row by using Ajax?

How to output a mysql row by using Ajax?

How can i get the whole row based on div ID(or something like this) using Ajax?

160
Parametrized query with MySQL executed atomically with SELECT using ADO.NET

Parametrized query with MySQL executed atomically with SELECT using ADO.NET

I am using ADONET and Parametrized Queries (unnamed parameters and ExecuteNonQuery method) to write to both SQL Server and MySQL dBases (the application has to work agnostically with both)

167