Mod Rewrite - yourdomain.com/key-words-here/ < how to?

Aussie-Dave

Former AGD Member
Joined
Nov 24, 2007
Messages
684
Reaction score
3
Hi,

Granted I should now how to do this but I don't.

I've been searching google to find how I do a Mod_Rewrite to use the same sort of URL's like Word Press.

EG : XXXhttp://www.yourdomain.com/my-key-words/

But can't find anything that explains it is simple terms.

If you know how to achieve this I'd appreciate a heads up, thanks.


Cheers

:)

Dave
 

Vladi

Affiliate Guard Dog Member
Joined
Feb 4, 2008
Messages
772
Reaction score
115
Total PITA if you are going to do it manually as you will need to do it for each and every page. Better to let software do it.

But if you insist or have no other option then edit .htaccess like so and it will 301 to the page you want without revealing the address change to the browser. It also handles stuff on the end of the urls like querystrings.

Code:
RewriteEngine on
RewriteRule ^keywords/path(.*)$ /real-html-file.html($1) [R=301,L,NC]
RewriteRule ^another/path/with/keywords(.*)$ /wherever/real-html-file2.html($1) [R=301,L,NC]
 
Top