Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    127
    Thanks
    9
    Thanked 0 Times in 0 Posts

    how to make .htaccess like wordpress permalink?

    as tittle now my current site .htaccess code is below

    Code:
    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

    Code:
    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

    Code:
    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.

  • #2
    Regular Coder
    Join Date
    Jan 2010
    Posts
    127
    Thanks
    9
    Thanked 0 Times in 0 Posts
    bump! anyone?

  • #3
    New Coder
    Join Date
    May 2010
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!!

  • #4
    Regular Coder
    Join Date
    Jan 2010
    Posts
    127
    Thanks
    9
    Thanked 0 Times in 0 Posts
    not working


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •