garry Posted January 7, 2009 Share Posted January 7, 2009 So I'm using Wordpress and need help rewriting one of the URL's. This is being done with a plugin and is outside of the capabilities of the WP admin panel. I'm thinking I'll need to use .htaccess to do this? This is an example of the URL mysite.com/something/?name=something/ This is how the URL's look now. What I want to do is rewrite it so that it just says mysite.com/something/something, where "something" is sent as the $_GET value. What's the easiest way to do this? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/139780-url-rewrite-question/ Share on other sites More sharing options...
The Little Guy Posted January 8, 2009 Share Posted January 8, 2009 Yes you will use an htaccess file. 1. Give this a good reading: http://corz.org/serv/tricks/htaccess2.php 2. You will end up with something like this: Options +FollowSymlinks RewriteEngine on RewriteRule ^blog/([0-9]+)-([a-z]+) http://corz.org/blog/index.php?archive=$1-$2 [NC] Link to comment https://forums.phpfreaks.com/topic/139780-url-rewrite-question/#findComment-732610 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.