PDA

View Full Version : WordPress & .htaccess



Stewart
18th Mar 2010, 10:52 am
Come up against an issue on my thesis website prosportswatches.co.uk (http://www.prosportswatches.co.uk).

I've installed wordpress to support a blog on prosportswatches.co.uk/blog but I'm having some issues with redirection. I've narrowed the issue down to the .htaccess file which I'm using to remove .php and deal with the canonical issue. When I remove it wordpress works as expected but when its in place I get a browser message advising me "The page isn't redirecting properly".

Here's the content of the .htaccess file:

RewriteEngine on

Options +FollowSymLinks
RewriteBase /


RewriteCond %{HTTP_HOST} ^prosportswatches.co.uk$ [NC]
RewriteRule (.*) http://www.prosportswatches.co.uk/$1 [R=301,L]


## JSHOP VERSION 2 WITH .php REMOVED REWRITE RULES ##
Options +SymlinksIfOwnerMatch +MultiViews
RewriteEngine on
RewriteBase /
RewriteRule ^(.*).php/(.*) $1.php?$2

I don't want to loose the functionality so has anyone got any ideas ?

Stewart
18th Mar 2010, 11:17 am
After a bit more investigation the issue appears to be coming from the first canonical rewrite statement, since when removed all works but I then have a canonical issue.

Stewart
18th Mar 2010, 11:34 am
Pleased to report issue resolved - slight problem with canonical statement which when changed resolved the problem - :-)

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^prosportswatches.co.uk$ [NC]
RewriteRule ^(.*) http://www.prosportswatches.co.uk/$1 [R=301,L]

David
18th Mar 2010, 02:42 pm
Hi Stewart - I've been teaching all morning so didn't see this till now. Glad you got it sorted out. Just like everything else in web design, one little misplaced character can cause hours of frustration. Although in this case, less than one hour - good going!