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
 
Thread Tools Display Modes
Share |
  #1  
Old 04-11-2007, 03:03 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
Mod Rewrite Help...please

Hello,

Not sure if this is the right forum for this question if not mods please move.

I am trying to redirect address...

http://internetmarketing.danielmillions.com/index.html

to

http://internetmarketing.danielmillions.com/

using a htaccess mod rewrite.

I can not get it to work for some reason. If some could post the script and help me out I would appreciate it.

Thanks

Last edited by DM_Web _Directory; 04-11-2007 at 03:10 PM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 04-11-2007, 03:13 PM
exam's Avatar
exam exam is offline
Senior Member
 
Join Date: 04-20-06
Posts: 278
iTrader: 0 / 0%
redirect 301 /index.html http://internetmarketing.danielmillions.com/

No need for mod_rewrite, which would be to redirect many pages, matching a pattern.
 
Reply With Quote
  #3  
Old 04-11-2007, 03:18 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
Quote:
Originally Posted by exam View Post
redirect 301 /index.html http://internetmarketing.danielmillions.com/

No need for mod_rewrite, which would be to redirect many pages, matching a pattern.
I tried this before and you can check http://internetmarketing.danielmillions.com/index.html
to see the error I get?
 
Reply With Quote
  #4  
Old 04-11-2007, 03:23 PM
exam's Avatar
exam exam is offline
Senior Member
 
Join Date: 04-20-06
Posts: 278
iTrader: 0 / 0%
What else do you have in the .htaccess file? Post the whole file here.
 
Reply With Quote
  #5  
Old 04-11-2007, 03:24 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
<IfModule mod_rewrite.c>
RewriteEngine on
redirect 301 /index.html http://internetmarketing.danielmillions.com/
</IfModule>

That is all that is in there on that subdomain
 
Reply With Quote
  #6  
Old 04-11-2007, 03:28 PM
exam's Avatar
exam exam is offline
Senior Member
 
Join Date: 04-20-06
Posts: 278
iTrader: 0 / 0%
Erase all the rest and leave only this one line:
Quote:
redirect 301 /index.html http://internetmarketing.danielmillions.com/
 
Reply With Quote
  #7  
Old 04-11-2007, 03:30 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
Quote:
Originally Posted by exam View Post
Erase all the rest and leave only this one line:
Still gives the same error. Would my root htaccess file have any affect on a subdomain?
 
Reply With Quote
  #8  
Old 04-11-2007, 03:34 PM
exam's Avatar
exam exam is offline
Senior Member
 
Join Date: 04-20-06
Posts: 278
iTrader: 0 / 0%
Quote:
Originally Posted by DM_Web _Directory View Post
Still gives the same error. Would my root htaccess file have any affect on a subdomain?
No.

Try removing the .htaccess file entirely to see if the error goes away.
 
Reply With Quote
  #9  
Old 04-11-2007, 03:35 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
The error remains on http://internetmarketing.danielmillions.com/ without the redirect.
 
Reply With Quote
  #10  
Old 04-11-2007, 03:37 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
I figured out, for some reason I had to name the index php instead of html

Thanks for your time - can I offer you a free submission to our directory for your help?

I was able to figure it out and did not even need a redirect to make it work. The address is a blog using the blogger.com service.

I had the blog saved as root/index.html when I changed it to root/index.php everything works fine for some reason.

Last edited by DM_Web _Directory; 04-11-2007 at 03:41 PM.
 
Reply With Quote
  #11  
Old 04-11-2007, 03:38 PM
exam's Avatar
exam exam is offline
Senior Member
 
Join Date: 04-20-06
Posts: 278
iTrader: 0 / 0%
Quote:
Originally Posted by DM_Web _Directory View Post
The error remains on http://internetmarketing.danielmillions.com/ without the redirect.
Actually, I *don't* see the error any more.
 
Reply With Quote
  #12  
Old 04-11-2007, 03:39 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
Quote:
Originally Posted by exam View Post
Actually, I *don't* see the error any more.
Yes, check one post up.
 
Reply With Quote
  #13  
Old 04-11-2007, 03:39 PM
brealmz's Avatar
brealmz brealmz is offline
Contributing Member
 
Join Date: 04-10-07
Posts: 90
iTrader: 0 / 0%
try this

RewriteCond index.html !-f
ReWriteRule index.html [L]

never mind.. wrong answer

Last edited by brealmz; 04-11-2007 at 03:41 PM. Reason: wrong answer
 
Reply With Quote
  #14  
Old 04-11-2007, 03:42 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
Quote:
Originally Posted by DM_Web _Directory View Post
I figured out, for some reason I had to name the index php instead of html

Thanks for your time - can I offer you a free submission to our directory for your help?

I was able to figure it out and did not even need a redirect to make it work. The address is a blog using the blogger.com service.

I had the blog saved as root/index.html when I changed it to root/index.php everything works fine for some reason.
I figured to out, thank you both.
 
Reply With Quote
  #15  
Old 04-11-2007, 03:44 PM
exam's Avatar
exam exam is offline
Senior Member
 
Join Date: 04-20-06
Posts: 278
iTrader: 0 / 0%
http://internetmarketing.danielmillions.com/
http://internetmarketing.danielmillions.com/index.html
http://internetmarketing.danielmillions.com/index.php
All return the status code 200, but they redirect in the browser. This could mean a duplicate content penalty for the site.

Tested with: (You can add this site to your directory, too, if you'd like, but it's not necessary.)
http://www.analogpoint.com/tools/webpageheaders.php
 
Reply With Quote
  #16  
Old 04-11-2007, 03:55 PM
DM_Web _Directory DM_Web _Directory is offline
Junior Member
 
Join Date: 04-11-07
Posts: 22
iTrader: 0 / 0%
I am going to add http://www.analogpoint.com/tools/webpageheaders.php to my tools page.

Thanks again for your time

Daniel
 
Reply With Quote
  #17  
Old 04-11-2007, 06:43 PM
Arenlor's Avatar
Arenlor Arenlor is offline
Senior Member
 
Join Date: 01-02-07
Location: PA, USA
Posts: 191
iTrader: 0 / 0%
Just a heads up, in FF the index.php doesn't redirect, don't feel like testing in others.
 
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
301 asp rewrite? bomy Coding Forum 10 06-19-2007 02:05 AM
How to do rewrite like v7n Antonio Coding Forum 3 04-01-2006 04:19 AM
need help with mod rewrite url rewrite sim Coding Forum 3 07-31-2005 06:51 PM
Mod Rewrite T-Kai Coding Forum 5 08-24-2004 10:42 PM
php rewrite? LazyJim Coding Forum 8 04-01-2004 03: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:12 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC