html to php to wordpress-help mod rewriting all links please

Discuss practical ways rearrange URLs using mod_rewrite.

Postby richardk » Mon Oct 19, 2009 11:11 am

Do you know what URL is requested by the spell checker?
Is it a POST or GET request?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby burgers » Tue Oct 20, 2009 5:40 am

I've tried to find some answers and after doing some research I believe the wp default spell checker uses the Google spell checker api.

It does not indicate this when using the spellchecker in W.P but I found a few things online which indicate the url to be

https://www.google.com/tbproxy/spell?lang=en&hl=en

and I think it might use a GET request as far as I can gather, but I assumed that from scanning other peoples codes online so I could be wrong.

Does that help at all ?
burgers
 
Posts: 10
Joined: Tue Oct 06, 2009 6:11 am

Postby richardk » Tue Oct 20, 2009 9:08 am

According to this page, the plugin is in /wp-content. So try
Code: Select all
Options +FollowSymLinks

<IfModule mod_rewrite.c>
  RewriteEngine On

  RewriteRule ^(.+)\.html$ http://www.streetmusician.co.uk/$1/ [NC,R=301,L]

  # Don't match internal sub requests (eg. to /index.php).
  RewriteCond %{ENV:REDIRECT_STATUS} ^$
  # Don't continue for /wp-login.php
  RewriteCond %{REQUEST_URI} !^/(wp-login)\.php$ [NC]
  # Don't continue for /wp-admin/*
  RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content)(/.*)?$ [NC]
  RewriteRule ^(.+)\.php$ http://www.streetmusician.co.uk/$1/ [NC,R=301,L]

  RewriteRule ^link/([-/_0-9a-zA-Z]+)$ /link.php?id=$1 [QSA,L]

  # BEGIN WordPress
  RewriteCond %{SCRIPT_FILENAME} !-f
  RewriteCond %{SCRIPT_FILENAME} !-d
  RewriteRule . /index.php [L]
  # END WordPress
</IfModule>
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby burgers » Tue Oct 20, 2009 10:10 am

Thanks... I see what you mean, but at the moment I am not using any plugin to perform the spell check, so the fix doesn't solve the issue. The spell check feature is just included in W.P 2.8.4 and I believe uses the google api..according to this..

http://wordpress.org/support/topic/207781

(see Otto42's second post)

However, the spell checker that wordpress uses for all its own hosted sites is called 'After the Deadline'. This isn't included as standard in self hosted sites like mine but there is an 'after the deadline' plug in that I could use which would mean the spell checker would then be operating from the plugin folder, making your fix work.

I'm happy to try this out as a work around, but if you'd rather solve the original spellcheck issue without implementing the plugin then I'm happy to keep trying.

What would you prefer ?
burgers
 
Posts: 10
Joined: Tue Oct 06, 2009 6:11 am

Postby richardk » Tue Oct 20, 2009 10:42 am

In
Code: Select all
(wp-admin|wp-content)

list all the Wordpress directories (because according to the thread you linked to the spell checker runs from /wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php).
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby burgers » Wed Oct 21, 2009 8:49 am

Excellent, I put (wp-admin|wp-content|wp-includes) as you suggested and the spell checker works fine now.

If I get any more problems I will keep adding files to that section to exempt them from the code in future.

Thanks richard, you are a real star and I really appreciate all the help you've given.

I'd be in a complete mess without it.

Cheers

8)
burgers
 
Posts: 10
Joined: Tue Oct 06, 2009 6:11 am

Previous

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 18 guests

cron