Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: PS4DEV on April 14, 2011, 01:10:49 PM

Title: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 01:10:49 PM
What do I have to do, if i wanted to change the folder name of my smf ?

Example:

domain.net/web/index.php   -> this is the current folder

I want to change the folder name to "forum"

domain.net/forum/index.php

-------------------------------------------------------------------------------------------------------------

Also , would it be possible to keep the "web" folder ?
Because , all my users wouldn´t know the new address :/

Could i create a index.php file in the old folder ("web") , that links to the new address ("forum")  ?


Thanks in advanced
Title: Re: changing smf folder ?
Post by: NanoSector on April 14, 2011, 01:22:47 PM
For moving:
1. Move your files
2. Run this on your new address:
http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php

For redirecting:
Place a file called index.php in the "web" folder with this code:
<?php
header
("Location: http://yoururl.com/forum/index.php");
?>


Good luck :)
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 01:34:08 PM
can you tell me, if this deinstalls forum add-ons (aka. mods) ?
I did a lot of manual modifications and i don´t want to lose these mods :/

Does it only have to change the url ?
Title: Re: changing smf folder ?
Post by: NanoSector on April 14, 2011, 01:35:20 PM
Quote from: PS4DEV on April 14, 2011, 01:34:08 PM
can you tell me, if this deinstalls forum add-ons (aka. mods) ?
I did a lot of manual modifications and i don´t want to lose these mods :/

Does it only have to change the url ?
Nope, you hold your mods :)

You need to change the paths, too.
Use all recommended settings in the Repair_Settings interface :)
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 01:55:16 PM
I did everything you said, but now i have some problems,

i have "pretty url´s" now all my links don´t work anymore :(

what to do ?
Title: Re: changing smf folder ?
Post by: NanoSector on April 14, 2011, 01:57:12 PM
Quote from: PS4DEV on April 14, 2011, 01:55:16 PM
I did everything you said, but now i have some problems,

i have "pretty url´s" now all my links don´t work anymore :(

what to do ?
Oh, if you have Pretty URL's, you need to reinstall that one.
But that is the only one :P
Title: Re: changing smf folder ?
Post by: SlammedDime on April 14, 2011, 02:00:29 PM
You'll need to truncate the pretty_url cache table in the database.  (no need to uninstall and install anything)
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 02:06:07 PM
do i have to uninstall it manually ?
i already changed all links and the folder :/ and i can not uninstall it with the forum feature ...
Title: Re: changing smf folder ?
Post by: NanoSector on April 14, 2011, 02:10:47 PM
Quote from: SlammedDime on April 14, 2011, 02:00:29 PM
You'll need to truncate the pretty_url cache table in the database.  (no need to uninstall and install anything)
^ This, sorry, I was thinking of an other mod :P
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 02:18:36 PM
i don´t understand ...

So I would need the database ? How can i get the database in bplaced.net ?

Or can i install it manually ?

Sry, im a noob
Title: Re: changing smf folder ?
Post by: SlammedDime on April 14, 2011, 02:31:04 PM
Drop this into a PHP file in your root SMF directory (same place as SSI.php) and run it...

<?php

require_once('SSI.php');

$smcFunc['db_query']('','TRUNCATE TABLE {db_grefix}pretty_urls_cache');

unlink(__FILE__);
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 02:36:56 PM
I got a database error, if i ran the file:

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back


:( :(
Title: Re: changing smf folder ?
Post by: NanoSector on April 14, 2011, 02:39:38 PM
Quote from: PS4DEV on April 14, 2011, 02:36:56 PM
I got a database error, if i ran the file:

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back


:( :(
Can you post the "MySQL returned: blahblah" line?
Title: Re: changing smf folder ?
Post by: SlammedDime on April 14, 2011, 02:43:24 PM
Sorry, try this instead...

<?php

require_once('SSI.php');

$smcFunc['db_query']('','TRUNCATE TABLE {db_prefix}pretty_urls_cache');

unlink(__FILE__);
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 02:47:37 PM
I dont get the error line message,

that´s , what i posted before, is the only message i got :(

to the code:

don´t i have to close the file again ?

<?php

require_once('SSI.php');

$smcFunc['db_query']('','TRUNCATE TABLE {db_prefix}pretty_urls_cache');

unlink(__FILE__);
?>
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 02:50:07 PM
@Slammed
this doesn´t work either, all i get is a white site, nothing will be shown :/
Title: Re: changing smf folder ?
Post by: PS4DEV on April 14, 2011, 03:16:22 PM
nobody can help me ??

please , i need to solve the problem soon  :'(
Title: Re: changing smf folder ?
Post by: NanoSector on April 14, 2011, 03:38:08 PM
please do not bump your topic in 24 hours,we are all volunteers :)
Title: Re: changing smf folder ?
Post by: desibees on April 14, 2011, 04:59:39 PM
Okay, this might work.
-Save all your files, export (save) your database.
-Backup everything
-Create a brand new forum, from the starting. This time rename the folder to "FORUM"
-Now just import all the files, import (upload) the database.
- Your done.

Now for the redirecting, keep the other files as well in file manager (don't delete them).
and try this (by: Yoshi2889)

QuoteFor redirecting:
Place a file called index.php in the "web" folder with this code:
Code: [Select]
<?php
header("Location: http://yoururl.com/forum/index.php");
?>
Title: Re: changing smf folder ?
Post by: SlammedDime on April 14, 2011, 06:04:48 PM
A whitescreen is exactly what you should get by running that small snippet of code.  After doing that, your forum should then be accessible.  If it isn't, please post what is still wrong.
Title: Re: changing smf folder ?
Post by: PS4DEV on April 15, 2011, 08:37:00 AM
Well, at the end , I was going another way

I switched back to the previous smf folder, then i deinstalled the  "simple url"

but i try it now, it won´t work either :( ,
especially the theme won´t work, even the default theme :(
Title: Re: changing smf folder ?
Post by: Illori on April 15, 2011, 09:22:08 AM
did you reset your themes with repair_settings after you reverted to the backup?
Title: Re: changing smf folder ?
Post by: PS4DEV on April 15, 2011, 12:22:43 PM
Ok, finally after a lot of trying , i got the forum working with themes. :)

But if I want to install "pretty url´s" , it uses the old link with "web" instead of "forum" :(

Can I delete the "pretty url´s" stuff from my database ? What can i do ?
Title: Re: changing smf folder ?
Post by: NanoSector on April 15, 2011, 12:31:51 PM
Quote from: PS4DEV on April 15, 2011, 12:22:43 PM
Ok, finally after a lot of trying , i got the forum working with themes. :)

But if I want to install "pretty url´s" , it uses the old link with "web" instead of "forum" :(

Can I delete the "pretty url´s" stuff from my database ? What can i do ?
Just reinstall the mod.
Title: Re: changing smf folder ?
Post by: PS4DEV on April 15, 2011, 12:45:36 PM
if i reinstall it , the old links saved in the database will be used :/
Title: Re: changing smf folder ?
Post by: Illori on April 15, 2011, 12:48:10 PM
you would get the best support to post in the mods support thread.
Title: Re: changing smf folder ?
Post by: SlammedDime on April 15, 2011, 12:56:43 PM
You can use a tool like phpMyAdmin to remove all of the prettyurls tables in the database (I never understood why Dannii coded it to do what it does... to each their own though, this is why SimpleSEF doesn't store anything other than settings in the database).
Title: Re: changing smf folder ?
Post by: PS4DEV on April 15, 2011, 01:09:23 PM
my server has this tool, so i only have to delete all "pretty urls" tables ? i count 2 tables of pretty urls..
Title: Re: changing smf folder ?
Post by: SlammedDime on April 15, 2011, 01:20:34 PM
Yes, deleting the Pretty Urls tables and uninstalling the mod will completely remove it from your install of SMF (as long as there are no errors on uninstall)
Title: Re: changing smf folder ?
Post by: PS4DEV on April 17, 2011, 05:15:10 PM
Lol, i tried to delete this 2 tables , and first it works deleting them.
But then if I try to install pretty urls , the old tables will be restored :(
Title: Re: changing smf folder ?
Post by: SlammedDime on April 17, 2011, 05:25:05 PM
It's not that they're restored, it's that they're being filled with the same data again, which means something in your pretty urls config, or your site config, is not correct.  Best to ask for support in the pretty urls topic to see what's up with it.