Question URLs Not Rewritten in Content, Also Not Canonicalized

Status
Not open for further replies.

vaultwiki

Customer
I've imported my VBSEO rules into DBSEO, and all the server-level Rewrite rules are working. For example, if I go to http://www.crackedeggstudios.com/blogs/38/ it works as expected.

However, it seems like that's all that's working:

If you hover/click any link to a different blog entry, you will see that it opens the entry.php?b=xx URL. Also, once on the entry.php variant, it does not redirect to the canonical /blogs/[blog_id]/. And the rel="canonical" tag uses the entry.php variant.

This behavior is consistent throughout the web site.
Should be /forums/[forum_id]/ in the forums and /threads/[thread_id]/ in threads. You will continue to see that these URL variants work, but are not enforced.

DBSEO General Settings > Enable Modification is turned on.
DBSEO URL Rewrites: Blog URLS > Rewrite Blog URLs is turned on.
DBSEO URL Rewrites: Forum URLs > Rewrite Forum URLs is turned on.
etc.

Obviously there is a setting I'm missing, but it doesn't stand out to me.
 
I visited your site, and I see all the URLs rewritten as intended:
eFvSuXl.png


Could you please try opening your site in another browser where you are not logged in and see if it works for you when logged out?

Also, could you please post the entirety of your .htaccess file here, in case there's an issue there that I can detect?
 
Interesting. The issue with URLs in content not rewriting seems to only affect administrators, maybe only super-administrators. It is fine for guests and regular users.

However, the following problem still occurs even for guests:
- If you manually enter entry.php?b=38, it lets you view that page. It does not redirect to the canonical version.

What do I have to do to get it working for super/admins?

I cannot post the entire .htaccess here, because we use nginx. The relevant part of the nginx config file is:
Code:
location / {
			if ($request_uri ~ ^/(forums|threads|members|users|blogs|support|issues|milestones|groups|tags|attachments|albums|news)/) {

				set $redirect_url $fastcgi_script_name;

				rewrite ^ /dbseo.php last;
			}
}
 
Last edited:
It wasn't translating content URLs because we admins have debug mode enabled. Is there a way to make it work even while debug mode is on?

Canonical redirects are still not working even with debug mode off.
 
The issue regarding canonical URLs is definitely because of the Nginx config. You need to ensure that all requests, even non-SEO'd URLs, gets routed through dbseo.php.
Otherwise, DBSEO will not be able to reroute the URLs.

Also, debug mode has no effect on DBSEO's ability to translate URLs, it's likely you have another mod conflict on your forum. I run with full debug mode both here @ DBTech (for me only) and on both my vB3 and vB4 development boards.
 
Thanks for the information. nginx can get a little weird with rewrite rules, so it took a while to get it working. Because the main .php location block was already catching plain entry.php etc, I had to create a separate location ~ ^/(every|single|php|file)\.php or it would occur too late in the stack. Might be able to do it with a regex like ^/[a-z_]*\.php but that might not be specific enough to occur earlier in the stack.

You were also right about a compatibility issue (needed to update the Debug Switch mod I had installed).

Anyway, thanks again. With your help I was able to find the problems and get everything working.
 
Status
Not open for further replies.

Legacy DragonByte SEO

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
7,172
Customer rating
5.00 star(s) 1 ratings
Top