Jump to content

url rewrite question..


garry

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.