chronister2 Posted December 16, 2019 Share Posted December 16, 2019 Hello Everyone, I hope all are well in here. It's been a LONG time since I've been here... glad to see it still thriving and going strong. Here is my predicament. ....... I'm creating an article section on my website, sort of a mini-blog within the site and need some assistance with .htaccess redirects to make SEO friendly URLs I've tried a ton of examples online and can't quite get it working I'm trying to take https://mywebsite.com/Articles/viewArticle.php?article=name-of-article which is the current url and structure of pulling the articles. I've got a db field that holds name-of-article and pulls that as my URL argument on the viewArticle.php page. I want to pass the url structure as shown below and my .htaccess redirects the internal pointers to viewArticle.php and passes the name-of-article part as a var. https://mywebsite.com/Articles/name-of-article I hope that makes sense. Here is the latest code I have attempted. This is in /Articles/.htaccess Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteRule /Articles/(.*) /viewArticle.php?article=$1 Any help is very appreciated. Thanks, Nathan Quote Link to comment https://forums.phpfreaks.com/topic/309692-htaccess-redirect-help/ Share on other sites More sharing options...
chronister2 Posted December 16, 2019 Author Share Posted December 16, 2019 Anyone? I'm still trying to find the exact answer, but am not able to so far. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/309692-htaccess-redirect-help/#findComment-1572565 Share on other sites More sharing options...
requinix Posted December 17, 2019 Share Posted December 17, 2019 Looking good so far. What kind of problems are you having with it? Quote Link to comment https://forums.phpfreaks.com/topic/309692-htaccess-redirect-help/#findComment-1572570 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.