Jump to content

Community

(Wolfie) CSEO redirect to IPB3 tool v31105


Wolfie
 Share

Recommended Posts

File Name: (Wolfie) CSEO redirect to IPB3 tool v31105

File Submitter: Wolfie

File Submitted: 01 Jul 2010

File Category: Utilities



IMPORTANT
This requires that you have some sort of .htaccess knowledge and that you are currently using .htaccess


Instructions
Rather simple. Upload the 'wolfurl.php' file into the same folder as 'conf_global.php' and configure the .htaccess file as follows:

* Use the .htaccess code as generated from within the ACP for using friendly URL's
* IMMEDIATELY after the RewriteBase line and before anything else, include the following two lines:

RewriteCond	%{REQUEST_URI} ^/boardpath/(.*-([a-z]+|b[0-9]+-entry)[0-9]+|forums?|blogs?|downloads?|gallery).html

	RewriteRule	. /boardpath/wolfurl.php [L]


(Be sure to replace "/boardpath/" with whatever your rewrite base is set to. Example, if it's set to "/forums/" then use that instead of "/boardpath/".)
* Test to make sure it works.

As a recommendation, in the ACP, Settings, Search Engine Optimization, use the following settings:
* Redirect to new friendly URL format? YES
* Incorrect Permalink Handling Redirect to the correct link with a "301" header


Advanced usage
If you are redirecting from another folder/site, the wolfURL.php file is already set up to handle this without making any edits, you just need to tweak the .htaccess rewriterule to do it.
RewriteRule . /path/to/wolfurl.php?redirect=/path/ [L]
or
RewriteRule . /path/to/wolfurl.php?redirect=http://newdomain.com/path/ [L]

v31105
* Fixed an issue with the download URL's
* Added support for blog entries and (I hope) individual blogs
* Added portal.html to redirect to app=portal
* Updated regex (the 31104 version was causing issues)
* Changed <#NUM#> to <#VALx#> references to make it easier to expand
* Better checking for use of templates

v31104
* Attempting to convert to friendly URL's (not a great attempt though, please read the readme file)
* Support added for downloads-cat, blogs, file#, etc.
* Fixed 'gallery-cat' URL.

v31103
* Updated to handle gallery cat/image URL's

v31102
* Updated to handle URL's for files.
* Redirects using 301 (permanently moved) to help with search engines

v31101 Initial release.



here to download this file

Link to comment
Share on other sites


ok where is it exactly ? :D



First I need to change those instructions to match the correct filename. :lol:
I've been naming the files "wolfurl.php" with the version number as part of the name as well, since "redirect.php" is likely to be a common name that could cause confusion. So the file needs to be renamed to "wolfurl.php", and there is no "redirect.php" file.


conf_global.php is in the board's top folder, where the main index.php file is located and where you will find folders like "public" "cache" "hooks" etc.
Link to comment
Share on other sites


How can we test to make sure it is working correctly?



Try to access one of your topics/forums/etc using the CSEO style URL and make sure it redirects to the correct topic/forum/etc.

If you're using IPB's built in thing to redirect to friendly URL's, then make sure that the script is redirecting to things like ?showtopic=###.
Link to comment
Share on other sites

Your redirects for the download system aren't working, I get redirected to my main page. Also you mentioned to change Use_Templates from 1 to 0 if redirecting to the ipb furls, this didn't work and I instead changed Use_Templates from 0 to 1 which did work, somewhat. Some user profiles also aren't loading, and blog is missing some rewrites/redirects.<br><br>Can you create a custom rewrite rule for me for the portal page using IPB furls, then a way to redirect portal.html to /forum/portal ?

Link to comment
Share on other sites


Your redirects for the download system aren't working, I get redirected to my main page. Also you mentioned to change Use_Templates from 1 to 0 if redirecting to the ipb furls, this didn't work and I instead changed Use_Templates from 0 to 1 which did work, somewhat. Some user profiles also aren't loading, and blog is missing some rewrites/redirects.<br><br>Can you create a custom rewrite rule for me for the portal page using IPB furls, then a way to redirect portal.html to /forum/portal ?



Could you provide me some links for what's not working? The "use templates" from 0 to 1 requires you to have a setting in the ACP (Search Engine Optimization) set to use. If you have that set and it's not working, then I'll need to take another look at it.

In the .htaccess change the code to this:

	RewriteCond	%{REQUEST_URI} ^/forum/(.*-[a-z]+[0-9]+|forum|blog|download|gallery)s?\.html


Obviously replace "forum" with the correct path to your board.

Let me know if that fixes the download issue, though it probably won't.

Link to comment
Share on other sites

Your fix fixed the issue with viewing certain profiles, I can now load my profile and another members profile without being redirected to the index. Your fix is now redirecting downloads to the correct url, for files only, loading old category urls are still redirecting to the index. Old CSEO style blog entry furls are also redirecting to the index. Besides those few issues everything appears to work fine.

If I paid you $5 via Paypal can you create a rewrite rules for the IPB Portal in furl templates so instead of http://www.thisisawe....php?app=portal it is http://thisisawebsite.com/forum/portal instead and create a redirect for my old portal.html page to redirect to the new rewritten IPB portal?

Thanks. :)

Link to comment
Share on other sites


If I paid you $5 via Paypal can you create a rewrite rules for the IPB Portal in furl templates so instead of http://www.thisisawe....php?app=portal it is http://thisisawebsite.com/forum/portal instead and create a redirect for my old portal.html page to redirect to the new rewritten IPB portal?



1. In the attached zip file, you'll find two files "furlRedirect.php" and "furlTemplates.php". Place them in the admin/applications_addon/ips/portal/extensions/ folder.


2. Go into the ACP, you should see a warning that you need to update the furl cache. If not, make sure you uploaded the files to the right location.


3. In the wolfurl.php file, find

			explode( "~", "([^/]*)-image([0-9]+).html~app=gallery&module=images&section=viewimage&img=<#NUM#>~viewimage" ),

		);

Replace with

			explode( "~", "([^/]*)-image([0-9]+).html~app=gallery&module=images&section=viewimage&img=<#NUM#>~viewimage" ),


			explode( "~", "/portal.html~app=portal~app=portal" ),

		);

4. Update the .htaccess file with this line:

	RewriteCond	%{REQUEST_URI} ^/forum/(.*-[a-z]+[0-9]+|forum|blog|download|gallery|portal)s?.html


Obviously, change "forum" to suit your needs.


5. Test thoroughly. If it works, you can find my email in the furl files to send the $ to. :P

Otherwise, need to debugger it some. I don't use the portal myself, so I've got it working as far as telling me the application is disabled.

http://domain.com/forum/portal
http://domain.com/forum/portal.html

Link to comment
Share on other sites

Thanks, I'll test and send you the $5 if it works. This is important to me since my portal and downloads are the most visited pages besides my forum. :)

What about the few issues I reported by the way?

:Edit: There's a small bug, when I visit the non-seo portal url such as /forum/index.php?app=portal I get a white page and the following error in my error logs instead of it redirecting to the rewritten portal page as it should.

[16-Jul-2010 17:16:26] PHP Fatal error:  Class 'furlRedirect_portal' not found in /home/user/www/forum/admin_dir/sources/base/ipsRegistry.php on line 1554

Link to comment
Share on other sites


Thanks, I'll test and send you the $5 if it works. This is important to me since my portal and downloads are the most visited pages besides my forum. :)



What about the few issues I reported by the way?



:Edit: There's a small bug, when I visit the non-seo portal url such as /forum/index.php?app=portal I get a white page and the following error in my error logs instead of it redirecting to the rewritten portal page as it should.



[16-Jul-2010 17:16:26] PHP Fatal error:  Class 'furlRedirect_portal' not found in /home/user/www/forum/admin_dir/sources/base/ipsRegistry.php on line 1554



Oops. Edit the furlRedirect.php file, change "class furlRedirect_downloads" to "class furlRedirect_portal". :lol:

This is why I say to test first. I'll take a look at the downloads issue in a little bit. Some specific links would be nice. An example of each CSEO url that is failing, to be exact.
Link to comment
Share on other sites

Here is the cseo style furl for the download system categories:

http://www.xtemu.com/forum/svn-emulator-builds-downloads-cat30.html

Here is the cseo style furl for the blog entries:

http://www.xtemu.com/forum/the-effect-internet-forums-b3-entry45.html



I've only bookmarked a select few cseo style furls for topics, sections, blogs, gallery, and downloads. I'm not sure if every url is redirecting properly, but I will continue testing.

Link to comment
Share on other sites


Here is the cseo style furl for the download system categories:



http://www.xtemu.com/forum/svn-emulator-builds-downloads-cat30.html



What are your SEO settings?
* Redirect to new friendly URL format?
* URL Type
* Incorrect Permalink Handling

Probably something I overlooked.
Link to comment
Share on other sites


Here is the cseo style furl for the blog entries:



http://www.xtemu.com/forum/the-effect-internet-forums-b3-entry45.html



Updated the file to 31105, let me know if it fixes the issues for you...



As a recommendation, in the ACP, Settings, Search Engine Optimization, use the following settings:
* Redirect to new friendly URL format? YES
* Incorrect Permalink Handling Redirect to the correct link with a "301" header


v31105
* Fixed an issue with the download URL's
* Added support for blog entries and (I hope) individual blogs
* Added portal.html to redirect to app=portal
* Updated regex (the 31104 version was causing issues)
* Changed <#NUM#> to <#VALx#> references to make it easier to expand
* Better checking for use of templates
Link to comment
Share on other sites


Another CSEO style url not redirecting properly:



www.xtemu.com/forum/xtreme2damaxs-blog-b1.html

No redirects for other cseo furls such as the member list, online list etc..?

find:

			explode( "~", "/([^/]*)-blog-b[0-9]+.html~app=blog&~showblog" ),

change to:

			explode( "~", "/([^/]*)-blog-b([0-9])+.html~app=blog&blogid=<#VAL2#>~showblog" ),




Also, I can't redirect what I don't know the CSEO format of. So I need examples of URL's to be able to regex them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy