Link to home
Start Free TrialLog in
Avatar of Sith_Lord
Sith_Lord

asked on

How to change links?

I had a website created for me a while ago by a web designer for a game I play called World of Warcraft. Long story short, the original domain name was rendfate.com. But it has now been changed to guildrendfate.org.  Problem is that now all the links on the site still point to rendfate.com. But I need them all to point to the new domain name. I had a bad experience with this designer and rather not go back to her for her to change the links for me. Not to mention that I am trying to save  some money. Can you blame me? :-)   Question is, how do I change the links to point the right domain now? I no nothing of web designing so that is why I wasn't able to figure it out. I have used an FRP client like cuteFTP to get in modify some text on the site. I even went in last night and did a search for everything on that site that comes up as rendfate.com to be replaced now to guildrendfate.org.  But still, all the links on top and the left of the site still point to rendfate.com.  How do I change this? Where do I go? What file or folder are these located?

Here is the new domain name of the site   www.guildrendfate.org

If that dont' work. Then it must still be pointing to www.rendfate.com just for the time being while it makes the transisition ovr to the new domain.
Avatar of TeRReF
TeRReF
Flag of Netherlands image

Is it plain html? Or do you use server-side scripting?
Avatar of Sith_Lord
Sith_Lord

ASKER

Like I said, I don't know anything about web programming. All the text you see on the page. I did some modifying on it. But I had to figure it out myself. I believe it is PHP or HTML. Like I said, don't listen to me as I have NO IDEA what i"m saying. :-)    Now the links is something else. I think it might be Java? Once again...I have no idea what I'm saying. Just go to the site and check it out. I think those links are Active X.
Avatar of HonorGod
if you are on a Linux (or other "Unix" type) machine, you can first locate all of the links in html files using
the find command:

find $DIR -name "*.html" -exec grep "www.rendfate.com" {} \;

Where $DIR is the directory containing your web site pages.  You can make this simple by "cd'ing to that root directory:"

# cd /opt/Apache/htdocs/WoW                                 <<< or whatever
# find . -name "*.html" -exec grep -l "www.rendfate.com" {} \;

In this case, the period (dot) is used to tell the find command to start in the 'current directory".  So it, and all of the sub-directories will be searched for files that end with "html", and each of them will be "grep'd" for the URL.

Just in case you are unfamiliar with grep, it is a powerful command that can be used in this case to search for a specific string of characters.  In this case "www.rendfate.com".  The -l command line parameter for grep asks it to simply list the files that contain the specified string.

Given this list of files, you can edit them to change the URL.

An alternative is to do it programattically.  There is a utility called "sed" (stream editor) that can be used to do this for you.
First, we need to get the list of files that need to be edited:

# cd /opt/Apache/htdocs/WoW                                 <<< or whatever
# find . -name "*.html" -exec grep -l "www.rendfate.com" {} \; >find.out 2>find.err

After executing these commands, a file will exist (find.out) that contains the names of the files to be modified.
Since it is a dangerous thing to just make all of the changes, without first checking this out, I suggest that you
create an input file for sed to make the desired transformation:

s/www.rendfate.com/www.guildrendfate.org/g

Say we name this file "sed.in", we can check to see if it works by taking the first filename in the list (i.e., in find.out)
and asking sed to make the transformation.

We could use vi to edit find.out, and type

:%s/^\(.*\).html$/sed -f sed.in \1.html >\2.new/
:x

This will change every line of the file from:

filename.html

to

sed -f sed.in filename.html >filename.new

Then, you can make this file executable:

chmod +x find.out

and try executing it:

./find.out

Take a look at the output files, and see if they are correct.  If so, you can rename the *.new files to *.html.
To do this programmatically, create a rename script file:

echo "filename=`basename $1 .new` >myMv.sh
echo "mv $filename.new $filename.html  >>myMv.sh

Make it executable:

# chmod +x myMv.sh

rename all of the *.new" files:

export here=$PWD
find . -name "*.new" -exec $PWD/myMv.sh {} .new \;




I read this about 11 times and I have no idea what you said. :-(   So sorry...I tried. Now I feel totally stupid. Not to mention very bad. You did all this for me. You typed all this out for me. But I just dont' have a clue what you said. Like I said before. I know nothing of web designing. I know a few weeks back, there were some rules I had to change. So I went into cuteFTP and went into my website. I found a file called rules.php. All I did was open and it removed and added some text. Saved it and then put it back up the website. When I refreshed my web browser. The new rules showed up. Now, what I did was that I manually went through each file and folder and replaced antying I was able to find that said www.rendfate.com. With now www.guildrendfate.org.  But like i said, it didn't fix anyting. When I click on the links on the top and on the side of the homepage, it still sends me to the rendfate.com domain.
.SWL..what is that?  I found 2 files. One of them opens in IE and shows me the links (and top picture). Adn the other .SWL file shows me the links on the left side. I cannot edit anything at all. Are these the files (links) that are to be changed?
If no one can help me resolve this. Can I at least be direct to a very cheap and fast web programmer? I know there are many out there. But I refuse to pay an arm and a leg for work that only take about 5 minutest to fix up.
The .swl extension means that they are flash files. They are binary files and cannot be edited. DId the programmer give you any source when delivering the site?
Source? What do you mean by source? Also, I was under the impression that this might be the problem. Is there any way I can edit them? Are there any free Flash editors I can use just to do what I have to do?
THe swl file is the compiled file. If you can accuire the sourcecode from the developer, someone here at EE can adjust it and compile it again so you have the adjusted flash files to put on the site...
So I basically cannot do anything at all until I get the source codes from the web programmer?
ASKER CERTIFIED SOLUTION
Avatar of TeRReF
TeRReF
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you accuire the code, you should post your question here:
https://www.experts-exchange.com/Web/WebDevSoftware/Flash/

Good luck!