News:

Join the Facebook Fan Page.

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

PS4DEV

#20
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 :(

Illori

did you reset your themes with repair_settings after you reverted to the backup?

PS4DEV

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 ?

NanoSector

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

if i reinstall it , the old links saved in the database will be used :/

Illori

you would get the best support to post in the mods support thread.

SlammedDime

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

PS4DEV

my server has this tool, so i only have to delete all "pretty urls" tables ? i count 2 tables of pretty urls..

SlammedDime

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

PS4DEV

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 :(

SlammedDime

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

Advertisement: