473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Generating a site map

Hey there everyone,
Sorry if this isnt the right place for this post.
I am building a script to generate a site map for me. For the most part it works fine, but a few errors are popping up.
Google isn't liking several of my urls. For instance, i have a url that ends in "trews.html". It looks like this line is fine in the site map, but when i type the url into the browser i get a 404 error as if the page doesn't exists. If i erase the url and type it out manually it works fine however.. and when i see the websites i recently visited, it lists "t%08rews.html" as one of them. It seems that perl is interpretting some kind of character that isnt there? I'm not sure. How could this be corrected?
Nov 30 '08 #1
11 1451
eWish
971 Expert 512MB
Without seeing some code it is we can't tell what your problem is. Also, you might post some of the expected output.

--Kevin
Nov 30 '08 #2
Well I have one program which is generating all of my html pages as well as a text file containing all of the urls that are being created. It seems as if the problem is stemming from there as my sitemap program is using that text file to create its site map. The problem is that I can't see the problem.. in the text file it looks just fine as "trews.html", but if i copy it into the browser it cant find that site without me re-writing it. And I can't really post the code as it is very long, just wondering if anyone had seen something like this before and could lead me on the right track.
Nov 30 '08 #3
Copying the url into word it appears as normal as "trews.html", but when copying from word into the browser it now appears as "t rews.html".
Nov 30 '08 #4
eWish
971 Expert 512MB
If you look up URL Encoding then %08 means that it is a backspace character.

So, I guess that your editor is adding some characters that don't need to be there. If you view and save your file using notepad or another text editor (not word or a word processor) do you still have the same problems?

--Kevin
Nov 30 '08 #5
KevinADC
4,059 Expert 2GB
Make sure your text file is plain text. Re-save the file as txt or ASCII instead of doc or other word processing format.
Nov 30 '08 #6
The file is .txt with UTF-8 encoding.
Dec 1 '08 #7
I have also tried opening the file with textwrangler and using the "convert to ASCII" option.. but no luck.
Dec 1 '08 #8
so i guess the question now is how could i use perl to remove a backspace?
Dec 1 '08 #9
KevinADC
4,059 Expert 2GB
Quite odd to ever see a backspace in a text file but I guess its possible. You can try this. \b inside a charcater class is a backspace:

$str =~ s/[\b]//g;
Dec 1 '08 #10
That did the trick for me. Thanks so much. It was the weirdest thing ever... it looked like it was fine when i copied the url. If you tried to hit backspace to erase it, it took two clicks on the spot where the extra character was to take it out.
Dec 1 '08 #11
KevinADC
4,059 Expert 2GB
You're welcome
Dec 1 '08 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Justin Lebar | last post by:
Sorry about the huge post, but I think this is the amount of information necessary for someone to help me with a good answer. I'm writing a statistical analysis program in ASP.net and MSSQL7 that...
1
by: Jane | last post by:
Hi I have an .aspx page thats part of a site, its usually called by a user in a browser with an ID in the querystring from where it does lots of exciting things and database reads to produce the...
0
by: Cenray | last post by:
How to generate a web request from a Winform Application using a WebService? In a C# Windows Application, when I try to genrate a web request using the following code, it is woking fine ...
5
by: Rajiv | last post by:
HI ALL, actually , i m working in a company having large number of employee , i have two userid and password . on id is from admin group(id given to me by technology manager) of the server and...
11
by: annie | last post by:
Hello all. I am writing an XSL stylesheet that automatically converts a page with frames to a noframes equivalent of this page, using tables. I can get the positioning of each frame write in the...
4
by: Justin | last post by:
I'm currently working on a management type of interface for a website. It's a PHP site with a MySQL backend. What I'd like to do is have a text box for editing text on the site, as well as a few...
4
by: Hugo Flores | last post by:
I created a Web Application Project in VS 2005. The site is working fine in the development computer. Then I transfer all my files and dll to the production computer. I have a login form. If I try...
4
by: Rob Kerr | last post by:
Hi, After a quick Google turned up very little of use, I've turned to here. The question: has anyone tried to (or more usefully, succeeded in) generating CSS files from an XML document...
6
by: Lloyd Sheen | last post by:
Perhaps I have missed something but what I would like to do is have a more "controlled" method of generating HTML from a web service. I can create items using HtmlTable, HtmlTableRow, and...
11
by: Faisal Vali | last post by:
Are there any guidelines people use that help them decide when it is better to dynamically generate all html elements using javascript versus actually writing some html and using it as scaffolding?...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.