0

I want to redirect this link:

/content/catagorie.php?item=Notariaat

To this link:

http://www.meddo.nl/vacatures/notariaat/

I used this:

Redirect /content/catagorie.php?item=Notariaat http://www.meddo.nl/vacatures/notariaat/ 

But it didn't work.

Thx

4
  • Try searching google for php create SEO friendly url, there are thousands of guides to do this. Commented Jun 3, 2015 at 9:29
  • 1
    Do you want to do it in .htaccess or inside the catagorie.php file itself ? Commented Jun 3, 2015 at 9:32
  • possible duplicate of How to rewrite SEO friendly url's like stackoverflow Commented Jun 3, 2015 at 9:34
  • To capture values from the query string, you need to use RewriteCond. Possible duplicate of Rewrite query string parameter into URL Apache Commented Jun 5, 2015 at 16:44

2 Answers 2

0

use this 301 redirect

 Redirect 301 http://example.com/content/catagorie.php?item=Notariaat http://www.meddo.nl/vacatures/notariaat/
Sign up to request clarification or add additional context in comments.

Comments

0

You can use these 2 rules in root .htaccess file:

RewriteEngine On

# external redirect from actual URL to pretty one
RewriteCond %{THE_REQUEST} /content/catagorie\.php\?item=([^\s&]+) [NC]
RewriteRule ^ /vacatures/%1? [R=302,L,NE]

# internal forward from pretty URL to actual one
RewriteRule ^vacatures/([^/.]+)/?$ /content/catagorie.php\?item=$1 [L,QSA,NC]

5 Comments

What is the full URL you entered in browser and also show your full .htaccess in question.
RewriteEngine On # external redirect from actual URL to pretty one RewriteCond %{THE_REQUEST} /content/catagorie\.php\?item=([^\s&]+) [NC] RewriteRule ^ /vacatures/%1? [R=302,L,NE] # internal forward from pretty URL to actual one RewriteRule ^vacatures/([^/.]+)/?$ /content/catagorie.php\?item=$1 [L,QSA,NC] Redirect 301 /content/catagorie.php?item=Notariaat meddo.nl/vacatures/notariaat
In which directory is this .htaccess located?
in the root of the wordpress
If it is WP then where are WP default rules? I don't see them in your rules

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.