View Full Version : SEO - use / instead of .html at end of URL
February 2nd, 2012, 11:03 PM
I would like to use / instead of .html at the end of each URL so it is inline with the rest of my site. What changes are needed to the rewrite rules to accomplish this?
I tried to replace .html with / in the first part of each rule but that doesn't seem to work.
RewriteRule ^gallery/g([0-9]+)-(.*)-page([0-9]+).html$ gallery/showgallery.php?cat=$1&page=$3 [L]
RewriteRule ^gallery/g([0-9]+)-(.*).html$ gallery/showgallery.php?cat=$1 [L]
February 3rd, 2012, 06:40 AM
There really is no code edit support so I can not really tell you how to hack the code here. I can say though maybe check out pp-inc.php the construct_newppurl function as that is what defines the urls.
February 3rd, 2012, 09:27 AM
Thanks, I'll take a look.
I noticed it cuts of some of the title in the URL when the album names and titles are above a certain length. Is there a specific reason for those and can that max length be changed somewhere?
February 3rd, 2012, 10:48 AM
You can check anything about the urls how they are done in that function as far as title length those are limited specifically by the script your viewing.
February 3rd, 2012, 02:01 PM
I figured out how to make it work replacing .html with / . I replaced all .html entries in that pp-inc.php file and adjusted the .htaccess with the same.
That worked for the main Gallery pages but the plugin on the forumhome page was still showing .html. So I generated a new product-pppro.xml file, changed the same .html to / in there and now it all seems happy.
I still haven't found the max length of the URL.
February 3rd, 2012, 02:05 PM
Like I said specific various scripts limit the title field so alot of the files there is code to limit the title.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.