News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

changing smf folder ?

Started by PS4DEV, April 14, 2011, 01:10:49 PM

Previous topic - Next topic

PS4DEV

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

NanoSector

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 :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

PS4DEV

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 ?

NanoSector

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 :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

PS4DEV

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 ?

NanoSector

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
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

SlammedDime

You'll need to truncate the pretty_url cache table in the database.  (no need to uninstall and install anything)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

PS4DEV

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 ...

NanoSector

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
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

PS4DEV

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

SlammedDime

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__);
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

PS4DEV

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


:( :(

NanoSector

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?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

SlammedDime

Sorry, try this instead...

<?php

require_once('SSI.php');

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

unlink(__FILE__);
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

PS4DEV

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__);
?>

PS4DEV

@Slammed
this doesn´t work either, all i get is a white site, nothing will be shown :/

PS4DEV

nobody can help me ??

please , i need to solve the problem soon  :'(

NanoSector

please do not bump your topic in 24 hours,we are all volunteers :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

desibees

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");
?>


I'm the.. Help abuser


SlammedDime

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.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Advertisement: