1

I have a custom link stored in a MySQL database and I want that link use instead of the default get-link with htaccess.

Example: If a visitor will read a blog, the url is www.domain.com/blog.php?post_link=2017-07-05/First-Post

Is there any way to use the post_link from the database instead the url now? I've read something about it here: SO Item, but that don't work...

Please help!


Before: www.domain.com/blog.php?post_link=2017-07-05/First-Post

After: www.domain.com/blog/2017-07-05/First-Post

This is my database

This is my code in blog.php

PS: It is SEO only..

1 Answer 1

0
RewriteEngine on
RewriteRule ^([0-9]+)/(.+)$ /blog.php?post_link=$1&First-Post=$2 [NC,QSA]

I have not tested it yet i hope it will work. and give you the desired results.

here is the answer in details

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.