...

View Full Version : how to make .htaccess like wordpress permalink?



lazyserv
10-04-2010, 10:01 AM
as tittle now my current site .htaccess code is below


Allow from All
RewriteEngine on

SetEnv DEVELOPMENT_ENVIRONMENT true

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_]*)$ index.php?page=$1 [L,QSA]

and the result is


http://www.example.com/index.php?page=home
to
http://www.example.com/home

now i want the result like wordpress permalink where i can get a / at the end of the link


http://www.example.com/wordpress/

how do i make it work? i download wordpress .htaccess and view but i don't understand at all, above code is i learn when i google up mod_rewrite as told by one of the forumer in my previous thread.

lazyserv
10-18-2010, 05:50 AM
bump! anyone?

bobbyq
10-21-2010, 08:56 PM
Try this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)([^/])$ http://example.org/$1$2/ [R=301,L]

Should work but Wordpress can do some funny things when it wants to!!

lazyserv
11-03-2010, 03:18 PM
not working :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum