Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
ParadigmX Posted July 11, 2015 Posted July 11, 2015 Hi, tried doing a search for re-write rules for nginx but couldn't find a solid consensus. Anyone know what I should be using? currently I have the following: location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ /index.php?$args; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules }
Gopher Gaming Posted July 11, 2015 Posted July 11, 2015 location / { try_files $uri $uri/ /index.php; } location ~^(/page/).*(.php)$ { try_files $uri $uri/ /index.php; }That is what is in my "site-available" config file for the forum, and friendly URLs are working.
ctrlbrk Posted July 14, 2015 Posted July 14, 2015 location / { try_files $uri $uri/ /index.php; } location ~^(/page/).*(.php)$ { try_files $uri $uri/ /index.php; }That is what is in my "site-available" config file for the forum, and friendly URLs are working.Friendly URL's display correctly, but a 404 file/path results in a loop. For example, www.mysite123123.com/this-url-doesnt-exist results in a redirect loop. What about you? What should happen is like what happens on this site:https://community.invisionpower.com/123123123
vpsBoard Posted July 21, 2015 Posted July 21, 2015 location / { try_files $uri $uri/ /index.php; } location ~^(/page/).*(.php)$ { try_files $uri $uri/ /index.php; }That is what is in my "site-available" config file for the forum, and friendly URLs are working.Strange, when adding this to my nginx config it appears to break the URL structure.Forums are linked on the index as: https://mydevsiteurl/forums/forum/2-an-example-forum/ ... shouldn't it be just, "https://mydevsiteurl/forum/2-an-example-forum/" Why is it showing FORUMS instead of forum in the URL? My IPB3 install is siteurl.tld/forum/this-is-a-forum . I'd submit a ticket asking this but they will not provide support for test installs, only live installs.
vpsBoard Posted July 21, 2015 Posted July 21, 2015 Ignore the above post. Got that figured out (had to change the URL structure in the Advanced Configuration --> Friendly URLs to remove all mentions of "forums" from the rewritten URLs. Now a new problem. For some reason the configuration and rewrite rules still require the 'index.php' to be part of the URL... any idea on how to fix this?
Xae Posted July 21, 2015 Posted July 21, 2015 Ignore the above post. Got that figured out (had to change the URL structure in the Advanced Configuration --> Friendly URLs to remove all mentions of "forums" from the rewritten URLs. Now a new problem. For some reason the configuration and rewrite rules still require the 'index.php' to be part of the URL... any idea on how to fix this?Have you enabled "Rewrite URLs" in System > Search Engine Optimisation?
vpsBoard Posted July 21, 2015 Posted July 21, 2015 Have you enabled "Rewrite URLs" in System > Search Engine Optimisation? When I do that, I get a 404 error with the rewrite rules mentioned in this thread.Otherwise they 'work' with that disabled but it prints index.php in the URL structure if I have that setting disabled.
ctrlbrk Posted July 21, 2015 Posted July 21, 2015 When I do that, I get a 404 error with the rewrite rules mentioned in this thread.Otherwise they 'work' with that disabled but it prints index.php in the URL structure if I have that setting disabled. I setup my forum as the 'root' for IPB, it looks like maybe you have it set differently which is why you had a nested site.com/forum/forum URL structure. I'm not certain, still new to IPB.
vpsBoard Posted July 21, 2015 Posted July 21, 2015 Nope, in the root dir. Dev site is https://ipb4.vpsb.in/ and is in the root dir. (/var/www/html)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.