SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast triz3000's Avatar
    Join Date
    Apr 2008
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up rewrite url in wordpress

    hi all ,
    i enabled and use permalink in wordpress by /%postname%/ but in the IE when you click on one of my pages the URL shows in the address bar like this

    "%d8%b1%d8%ae%d9%86%d9%87-%d8%a7%d9%85%d9%86%db%8c%d8%aa%db%8c-%d9%85%d8%b1%d9%88%d8%b1%da%af%d8%b1/"

    but in the chrome it shows OK like this "www.mydomain.com/mobile-galaxy-s3"
    also in the source code of that page for both browser you will see

    <link rel="canonical" href="http://mydomain.com/%da%af%d9a%a%8c-%d9%86%d8%aa-2-%da%a9%d8%b1%d9%87/" />

    my .htaccess is as follow :
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /ITnews
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>


    # END WordPress

    could anyone help me ?
    thanks a lot

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,833
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Are you using any plugins or a custom theme? It looks like your URL output is being encoded. Exactly why this is occurring is impossible to tell at this time. Are you doing any manual outputting of the_permalink() or get_permalink() or is your theme doing any URL encoding? Take a look at the slug in the posts table in the database (post_name field). Are the percent characters in there? Were there any character set changes done to your database? From your post it seems like you are using standard ASCII characters.

    Unless you can find a quick solution, we are going to have to try to narrow down the problem. If the post slug looks fine in the database, we know the problem isn't there. Also, does this encoding problem go away if you change the permalink format? Try changing it to different things temporarily and see.

  3. #3
    SitePoint Enthusiast triz3000's Avatar
    Join Date
    Apr 2008
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by cheesedude View Post
    Are you using any plugins or a custom theme? It looks like your URL output is being encoded. Exactly why this is occurring is impossible to tell at this time. Are you doing any manual outputting of the_permalink() or get_permalink() or is your theme doing any URL encoding? Take a look at the slug in the posts table in the database (post_name field). Are the percent characters in there? Were there any character set changes done to your database? From your post it seems like you are using standard ASCII characters.

    Unless you can find a quick solution, we are going to have to try to narrow down the problem. If the post slug looks fine in the database, we know the problem isn't there. Also, does this encoding problem go away if you change the permalink format? Try changing it to different things temporarily and see.
    Dear cheesedude
    thank you so much for your reply ,
    Yes , in the database => table Posts => field post_name => the percent characters are here too ?
    could you tell me how to solve it ?

  4. #4
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,833
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by triz3000 View Post
    Dear cheesedude
    thank you so much for your reply ,
    Yes , in the database => table Posts => field post_name => the percent characters are here too ?
    could you tell me how to solve it ?
    Are you using a language other than English? I read a little about people using character sets other than English having percent signs in their permalink URLs. When I looked at the escape codes you provided it looked like there were some non-English characters in there.

    Are you using a custom theme or any plugins? If you are using a custom theme, switch back to the default theme temporarily and make some test posts. Look in the database and see if there are any escaped characters in the URL slug. If so, disable your plugins and make some more test posts. When you are done testing, you can re-enable your plugins and go back to any custom theme if you are using one.

    It's going to be a process of elimination.

  5. #5
    SitePoint Enthusiast triz3000's Avatar
    Join Date
    Apr 2008
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by cheesedude View Post
    Are you using a language other than English? I read a little about people using character sets other than English having percent signs in their permalink URLs. When I looked at the escape codes you provided it looked like there were some non-English characters in there.

    Are you using a custom theme or any plugins? If you are using a custom theme, switch back to the default theme temporarily and make some test posts. Look in the database and see if there are any escaped characters in the URL slug. If so, disable your plugins and make some more test posts. When you are done testing, you can re-enable your plugins and go back to any custom theme if you are using one.

    It's going to be a process of elimination.


    my friend cheesedude :
    no matter which language you use english / arabic both have the same problem .
    also the second way that you told me , didnt work .
    anyway you know i just want decode them , in the IE browser the URL shown like this "%aa%d8%b3%d8%aa-%d8%b5%d9%81%d8%a" but in the chrome address bar shown correctly also shown in google search correctly but if you view the source code by both browsers + IE address bar they will be dirty !
    hope to have your reply soon


Bookmarks

Posting Permissions

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