Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 04-12-2012, 03:26 AM
Junior Member
 
Join Date: 12-28-09
Posts: 2
iTrader: 0 / 0%
.htaaccess help to remove double // in urls automatically

My site's URL (web address) is: bassguitarplayerworld.com/

I had been getting tons of 404 errors in webmaster.

I had narrowed them down to certain problems here and would be thankful for any expert help on this issue.

The problems stem from urls that seems to be server configuration in terms of HTACCESS.
Let me explain:

This is a normal url in which content is being shown normally.

bassguitarplayerworld.com/Maintenance/Boiling-Your-Bass-Guitar-Strings.html

In google webmaster, I had been getting 404 errors that stem from an additional / in the url address. As a result of extra /'s or double //s in the url, the css and the layout of the site is screwed up. Resulting in an unlimited number of 404 errors to be detected.

bassguitarplayerworld.com/Maintenance//Boiling-Your-Bass-Guitar-Strings.html
Please view the attached photograph to see all the 404 links that are created as a result in the left panel.


I tried to do a test in Wordpress blogs and use this as an example.
bassguitarplayerworld.com/blog/2012/02/how-to-play-a-bass-guitar/

If I were to add an additional / in the url,

bassguitarplayerworld.com/blog/2012/02//how-to-play-a-bass-guitar/
the browser automatically removes and corrects the double // issue

bassguitarplayerworld.com/blog/2012/02//how-to-play-a-bass-guitar/ becomes => bassguitarplayerworld.com/blog/2012/02/how-to-play-a-bass-guitar/ automatically.

Can anyone help with the htacess code that is needed to do this on my main URL so that
bassguitarplayerworld.com/Maintenance//Boiling-Your-Bass-Guitar-Strings.html becomes => bassguitarplayerworld.com/Maintenance/Boiling-Your-Bass-Guitar-Strings.html automatically?

Please help and thanks in advance.
 
Reply With Quote
  #2 (permalink)  
Old 04-12-2012, 04:42 AM
RiptideTempora's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 11-30-11
Location: Orlando, FL
Posts: 235
iTrader: 0 / 0%
Quote:
Originally Posted by paulgian View Post
My site's URL (web address) is: bassguitarplayerworld.com/

I had been getting tons of 404 errors in webmaster.

I had narrowed them down to certain problems here and would be thankful for any expert help on this issue.

The problems stem from urls that seems to be server configuration in terms of HTACCESS.
Let me explain:

This is a normal url in which content is being shown normally.

bassguitarplayerworld.com/Maintenance/Boiling-Your-Bass-Guitar-Strings.html

In google webmaster, I had been getting 404 errors that stem from an additional / in the url address. As a result of extra /'s or double //s in the url, the css and the layout of the site is screwed up. Resulting in an unlimited number of 404 errors to be detected.

bassguitarplayerworld.com/Maintenance//Boiling-Your-Bass-Guitar-Strings.html
Please view the attached photograph to see all the 404 links that are created as a result in the left panel.


I tried to do a test in Wordpress blogs and use this as an example.
bassguitarplayerworld.com/blog/2012/02/how-to-play-a-bass-guitar/

If I were to add an additional / in the url,

bassguitarplayerworld.com/blog/2012/02//how-to-play-a-bass-guitar/
the browser automatically removes and corrects the double // issue

bassguitarplayerworld.com/blog/2012/02//how-to-play-a-bass-guitar/ becomes => bassguitarplayerworld.com/blog/2012/02/how-to-play-a-bass-guitar/ automatically.

Can anyone help with the htacess code that is needed to do this on my main URL so that
bassguitarplayerworld.com/Maintenance//Boiling-Your-Bass-Guitar-Strings.html becomes => bassguitarplayerworld.com/Maintenance/Boiling-Your-Bass-Guitar-Strings.html automatically?

Please help and thanks in advance.
Would something like this work?
Code:
RewriteRule ([^/]{2,})//([^/]{2,}) $1/$2
__________________
This Link Will Self-Destruct
Keenotes - A place for sharp minds
 
Reply With Quote
  #3 (permalink)  
Old 04-12-2012, 05:07 AM
Junior Member
 
Join Date: 12-28-09
Posts: 2
iTrader: 0 / 0%
hi riptide,

thanks for your response. I tried it. Unfortunately, the // still persists.

Paul
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Remove Urls from Google Puneetem Google Forum 18 03-03-2012 12:14 AM
How to Redirect or Remove my old urls of the same website? rizecorp SEO Forum 9 02-03-2012 02:46 AM
How to remove unexpected URLs from Google index result tim wallace SEO Forum 11 09-21-2011 02:55 PM
Problem with www.* prepending itself to my urls automatically knowledgedot Coding Forum 6 03-20-2007 10:37 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:24 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.