XF 1.5 Google seems to have /threads/123456 as indexed URL's and not /threads/title-of-thread.123456

Donny

Active member
Google seems to have /threads/123456 as indexed URL's and not /threads/title-of-thread.123456, I assume this is something to do with my htaccess?

Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /threads/$1/ [R=301,L]
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
#RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]



#    Mod_security can interfere with uploading of content such as attachments. If you
#    cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#    SecFilterEngine Off
#    SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    #RewriteBase /xenforo

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
</IfModule>

I'm assuming specifically this line: RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /threads/$1/ [R=301,L]

I ported from VB to XF and perhaps can use the stock htaccess now with VB but I don't want to screw anything up with the Google index.

Worth noting that once a person visits the URL, it does redirect to the full URL with the thread title etc in.

What does one do in this position?
 
It looks like your htaccess is redirecting showthread.php?t={threadid} to /threads/{threadid} - the thread title URL isn't available to .htaccess so unfortunately nothing can be done.

On the plus side they're being indexed!
 
Yeah, suppose so. :)

I'll just let Google sort it out over time then. I feared it was something that caused a massive drop in traffic from Bing/Yahoo that I appeared to be having issues with, but I signed up to the Bing Webmaster Tools thing and submitted my sitemap and we're back #1 for everything we're meant to be. So I don't think it actually was anything to do with my massive amount of redirects, sometimes redirecting twice it seems (even three times if they tried the non-www version of an old VB URL!!!) - But it seems Google and Bing are alright with that as long as the landing page is what it was expecting.

Thanks for the reply pal. If there's nowt I can do, there's nowt that needs to be done. I'll go home early then. :)
 
I think if you leave the redirects in place until you're confident you aren't getting any visits via your old vB URLs you can switch back to stock XenForo and Google should 301 the ID-only URLs to title-based.
 
Back
Top Bottom