Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Sponsored Reviews   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 04-11-2007, 03:03 PM   #1 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
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.
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 04-11-2007, 03:13 PM   #2 (permalink)
Contributing Member
 
exam's Avatar
 
Join Date: 04-20-06
Posts: 310
iTrader: 0 / 0%
Latest Blog:
None

exam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web pro
redirect 301 /index.html http://internetmarketing.danielmillions.com/

No need for mod_rewrite, which would be to redirect many pages, matching a pattern.
exam is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:18 PM   #3 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
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?
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:23 PM   #4 (permalink)
Contributing Member
 
exam's Avatar
 
Join Date: 04-20-06
Posts: 310
iTrader: 0 / 0%
Latest Blog:
None

exam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web pro
What else do you have in the .htaccess file? Post the whole file here.
exam is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:24 PM   #5 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
<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
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:28 PM   #6 (permalink)
Contributing Member
 
exam's Avatar
 
Join Date: 04-20-06
Posts: 310
iTrader: 0 / 0%
Latest Blog:
None

exam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web pro
Erase all the rest and leave only this one line:
Quote:
redirect 301 /index.html http://internetmarketing.danielmillions.com/
exam is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:30 PM   #7 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
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?
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:34 PM   #8 (permalink)
Contributing Member
 
exam's Avatar
 
Join Date: 04-20-06
Posts: 310
iTrader: 0 / 0%
Latest Blog:
None

exam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web pro
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.
exam is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:35 PM   #9 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
The error remains on http://internetmarketing.danielmillions.com/ without the redirect.
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:37 PM   #10 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
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.
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:38 PM   #11 (permalink)
Contributing Member
 
exam's Avatar
 
Join Date: 04-20-06
Posts: 310
iTrader: 0 / 0%
Latest Blog:
None

exam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web pro
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.
exam is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:39 PM   #12 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
Quote:
Originally Posted by exam View Post
Actually, I *don't* see the error any more.
Yes, check one post up.
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:39 PM   #13 (permalink)
Inactive
 
Join Date: 04-10-07
Location: www.webfoyers.com
Posts: 68
iTrader: 0 / 0%
Latest Blog:
None

brealmz is liked by somebodybrealmz is liked by somebodybrealmz is liked by somebody
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
brealmz is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:42 PM   #14 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
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.
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:44 PM   #15 (permalink)
Contributing Member
 
exam's Avatar
 
Join Date: 04-20-06
Posts: 310
iTrader: 0 / 0%
Latest Blog:
None

exam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web pro
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
exam is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 03:55 PM   #16 (permalink)
Junior Member
 
Join Date: 04-11-07
Posts: 21
iTrader: 0 / 0%
Latest Blog:
None

DM_Web _Directory is liked by many
I am going to add http://www.analogpoint.com/tools/webpageheaders.php to my tools page.

Thanks again for your time

Daniel
DM_Web _Directory is offline  
Add Post to del.icio.us
Reply With Quote
Old 04-11-2007, 06:43 PM   #17 (permalink)
Contributing Member
 
Arenlor's Avatar
 
Join Date: 01-02-07
Location: PA, USA
Posts: 194
iTrader: 0 / 0%
Latest Blog:
None

Arenlor is liked by somebodyArenlor is liked by somebodyArenlor is liked by somebodyArenlor is liked by somebody
Send a message via ICQ to Arenlor Send a message via AIM to Arenlor Send a message via MSN to Arenlor Send a message via Yahoo to Arenlor
Just a heads up, in FF the index.php doesn't redirect, don't feel like testing in others.
__________________
Need a page made? Draw a diagram, I suggest using Paint, show the picture with your post, it'll help a lot more than you think. Other questions? Draw a diagram for that too!
Arenlor is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > 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

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

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


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 09:45 PM.
© Copyright 2008 V7 Inc