.htaccess

Mark

Administrator
Staff member
VisioList uses /something to handle the $_GET['a'] value from the query string, so you need to use an identifier to let the script know to expect a category name and not a "source" like "stats"

I would strongly urge you not to do this, but if you absolutely must....

you can open index.php and look at modifying these 2 values:
PHP:
    $TMPL['url_helper_cat'] = 'category/';
    $TMPL['url_helper_cat2'] = '/category/';
can change these to something like:
PHP:
    $TMPL['url_helper_cat'] = 'c/';
    $TMPL['url_helper_cat2'] = '/c/';
which would make your URL's something like: http://www.toplist.tld/c/Cat1

but I think that is about as close as its going to get without making drastic changes to the PHP code.

then you need make the same change in .htaccess
Code:
RewriteRule ^rank/(.*)/(.*)/category/(.*)/ index.php?start=$1&method=$2&cat=$3 [L]
RewriteRule ^rank/(.*)/category/(.*)/ index.php?method=$1&cat=$2 [L]
woudl need to be changed to:
Code:
RewriteRule ^rank/(.*)/(.*)/c/(.*)/ index.php?start=$1&method=$2&cat=$3 [L]
RewriteRule ^rank/(.*)/c/(.*)/ index.php?method=$1&cat=$2 [L]
doing this however will cause other problems I am sure, namely with pagination and probably other parts of the script. Making this change is NOT recommended.
 

leonor

Active Member
License Active
hm :/

okay and when i change "Category" to "Toplist", i will also get trouble with VL ?
 

Mark

Administrator
Staff member
it hard to say without testing, can I ask the reason you want to change this?
 

leonor

Active Member
License Active
I talk to a friend how is making SEO, and he say its not good to have this there. (because of ... i forget it :p )
But when i can change this to other word, i have more keywords in my URL so its a solution for me :)
 

Mark

Administrator
Staff member
consider the pros and cons of such a change.
A good video from Matt Cutts on the topic:http://searchengineland.com/googles-matt-cutts-on-keywords-in-the-url-16976

The SEO impact of /category/ in the URL is going to be very small (if any), though this might have been better if we had originally used /c/ for the sake of different languages. I'm not sure this is something we should change in VL at this stage though. But I will look at options for how we can allow even more flexible URL's :)

You can change /category"/ to another word if you like, just remember you will need to make that change in several files and this will need to be done with each update, I'm not sure this is something that could be handled completely via plugins, I cannot also guarantee the results of other features with this change.

In the end the potential problems probably outweigh the benefits. I suggest you wait for now, and see what we come out with in future versions, we will be reworking the category URL parts anyway so perhaps we will find a way.
 

leonor

Active Member
License Active
okay, i did the changes in last time. And now i found one error in my page.


Normaly its:
Code:
http://private-server.ws/[B]category[/B]/Shaiya/
how i can change this to ?
Code:
http://private-server.ws/toplist/Shaiya/

EDIT:

okay i changed
Code:
$TMPL['url_helper_cat'] = 'category/';
$TMPL['url_helper_cat2'] = '/category/';
to
Code:
$TMPL['url_helper_cat'] = 'toplist/';
$TMPL['url_helper_cat2'] = '/toplist/';
i have to change more things?
 

Basti

Administrator
Staff member
That should do it, but please use a plugin for this else your change is lost next update.
Also make sure you do not replace your htaccess on the next update. Make a backup of your current file in case we add something new to it ( more likely not ) you can apply it again

Upload this through plugin manager
 

Attachments

leonor

Active Member
License Active
omg know i see my mistake :p i forget it last update to change it again :/

thanks for the plugin =)
 

leonor

Active Member
License Active
shit ^^ i found one problem with this Change when i open
and scroll down and click then on "2" or ">" its a not changed link like this5
How i can Change this? I searched in the hours it but i cant find it.

And i think i have to change /toplist/ to /top100/ i tryed to write this
Code:
RewriteRule ^toplist/?$ /top100/ [R=301,L]
in .htaccess befor
Code:
RewriteRule ^toplist/(.*)/ index.php?cat=$1 [L]
to make a 301 rewrite, but its not working. (and yes i changed every toplist to top100, in plugin to^^)
Some one have a better idea?
 

Basti

Administrator
Staff member
Unfortunatly that is still hardcoded in vl < 0.9 and is to found in sources/misc/skin.php . You can change it manually for now, 0.9 will have a improoved pagination system and that stuff is a variable there as well, so you would only need to do this once.

From here on onwards you find several links where you can replace the link part
Code:
    //CLEAN URL PAGINATION
 

Basti

Administrator
Staff member
As far as the redirect goes, you will face big issues if you use htaccess for it. Its better to construct a 301 redirect in the plugin file, can be more dynamic there.
Please attach your current plugin and ill write the code for you
 

leonor

Active Member
License Active
Nice! When i have solution for the redrict i will change it.

My current plugin? oO i use the plugin from this Thread and some normal Plugins so i can't attach you anything :(
 

Basti

Administrator
Staff member
Yes, pls post the plugin you use currently ( from this thread ) so i have all the changes you made. Or havent you edited anything from it? Been half a year, so bear with me :) Did we/you customized it further? or are there just the 2 lines of code as in this thread?
 

leonor

Active Member
License Active
we changed only this 2 lines from this thread, and the changes in .htaccess file.
 

Basti

Administrator
Staff member
Alright, ill use this one then. ill try it out later today or tomorrow with either php or htaccess
 

Basti

Administrator
Staff member
Ok Leonor, you were close with your solution :)
Add this to your htaccess at the bottom

Code:
################ Redirect old urls
RewriteRule ^toplist/(.*)$ /top100/$1 [R=301,L]
Unfortunatly, this does not seem to work for the pagination links, but they are no follow anyway, so you should have close to zero of them indexed.
 
Top