tags:

views:

43

answers:

2

We are having some issue with our relative path in wordpress. Earlier our application was like http://www.skill-guru.com/skill . So if we type the blog address as http://www.skill-guru.com/blog it would add a / at end and open it as http://www.skill-guru.com/blog/ Now our application opens as root in domain http://www.skill-guru.com. Our blog is opening as http://www.skill-guru.com/blog/ but not as http://www.skill-guru.com/blog. I am not able to understand the reason. because of this issue , search is also not working. Can anyone please help me understand what has changed and how it can be fixed ?

A: 

If I visit http://www.skill-guru.com/blog, I get the error:

HTTP Status 404 - /blog

type Status report

message /blog

description The requested resource (/blog) is not available. Apache Tomcat/6.0.16

This implies that there might be url-rewriting in place or server configuration does not allow you to strip the trailing backslash, you should consult with server support theam.

Sarfraz
Unfortunately there is no server support team. I think the developers nuked the .htaccess as Greg has pointed out.
vsingh
+2  A: 

I'm not sure about the underlying cause, but while you figure that out you may just want to redirect "blog" to "blog/" in your .htaccess file. I think this will do it...

RewriteCond %{REQUEST_URI} ^.*/blog$
RewriteRule ^(.+)$ $1/ [R=301,L]

I'm assuming that somewhere else in the .htaccess you have...

RewriteEngine On
RewriteBase / 

In fact, you might find that in the process of changing you site someone nuked the existing .htaccess.

Greg
There have been changes to existing .htaccess and I guess that might have caused the problem. I will try these changes to .htaccess. Thanks
vsingh
Greg, you are awesome. This works man ! This re write condition I had to write in the blog folder instead of root folder. Thanks a ton!!
vsingh