Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Mod Rewrite help

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  OS and browser detection  
Author Message
hortnerds

External


Since: Aug 15, 2003
Posts: 5



(Msg. 1) Posted: Fri Aug 15, 2003 11:02 pm
Post subject: Mod Rewrite help
Archived from groups: alt>apache>configuration (more info?)

I've got 10,000+ files in a folder http://www.myseite.com/acrhives/
i.e. .../archives/2000/12/, .../archives/2000/11/, .../archives/2000/10/ ...
Several years, many months of html mhonarc-archived docs.

We have so many files in this one folder, I've decided to make a
new subsite: http://archives.mysite.com/ where all the file hierarchy
that was in www.mysite.com/archives/ will be exactly reflected
in http://archives.mysite.com/ .
i.e. http://archives.mysite.com/2000/12/, .../2000/11/, .../2000/10/ ...

I'd like to permanently redirect this so good search engines
stop looking in the wrong place and start archiving only
archive.mysite.com.

I think need to mod_rewrite /archives/... so that any call for any page in
any subdirectory is automatically reflected to the new subsite
at it's mirror path and document name.

I read the apache mod_rewrite info on the web about this,
and guessed I need to use a .htaccess file like this:

# filename- /archives/.htaccess
RewriteEngine On
RewriteRule ^(.*) http://archive.mysite.com$1 [R]

Unfortunately this doesn't seem to work for anything
except a direct call to http://www.mysite.com/archives/.
(It doesn't work for http://www.mysite.com/archives/index.html,
http://www.mysite.com/archives/page2.html
http://www.mysite.com/archives/2000/12/index.html
etc.

Any suggestions will be greatly appreciated.

Chris

 >> Stay informed about: Mod Rewrite help 
Back to top
Login to vote
dorward

External


Since: Jun 27, 2003
Posts: 195



(Msg. 2) Posted: Sat Aug 16, 2003 3:31 pm
Post subject: Re: Mod Rewrite help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

hort nerd wrote:

 > We have so many files in this one folder, I've decided to make a
 > new subsite: <a style='text-decoration: underline;' href="http://archives.mysite.com/" target="_blank">http://archives.mysite.com/</a> where all the file hierarchy
 > that was in <a style='text-decoration: underline;' href="http://www.mysite.com/archives/" target="_blank">www.mysite.com/archives/</a> will be exactly reflected
 > in <a style='text-decoration: underline;' href="http://archives.mysite.com/" target="_blank">http://archives.mysite.com/</a> .

 > I'd like to permanently redirect this so good search engines
 > stop looking in the wrong place and start archiving only
 > archive.mysite.com.

I think:

Redirect permanent /archives/ <a style='text-decoration: underline;' href="http://archives.mysite.com/" target="_blank">http://archives.mysite.com/</a>

.... should do the trick.

--
David Dorward <a style='text-decoration: underline;' href="http://dorward.me.uk/" target="_blank">http://dorward.me.uk/</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Mod Rewrite help 
Back to top
Login to vote
hortnerds

External


Since: Aug 15, 2003
Posts: 5



(Msg. 3) Posted: Sat Aug 16, 2003 3:31 pm
Post subject: Re: Mod Rewrite help [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks!
I guess I was trying to making it
harder than it really was.

Chris

"David Dorward" <dorward.RemoveThis@yahoo.com> wrote in message news:bhl4mo$mt8$1$830fa795@news.demon.co.uk...
 > hort nerd wrote:
 >
  > > We have so many files in this one folder, I've decided to make a
  > > new subsite: <a style='text-decoration: underline;' href="http://archives.mysite.com/" target="_blank">http://archives.mysite.com/</a> where all the file hierarchy
  > > that was in <a style='text-decoration: underline;' href="http://www.mysite.com/archives/" target="_blank">www.mysite.com/archives/</a> will be exactly reflected
  > > in <a style='text-decoration: underline;' href="http://archives.mysite.com/" target="_blank">http://archives.mysite.com/</a> .
 >
  > > I'd like to permanently redirect this so good search engines
  > > stop looking in the wrong place and start archiving only
  > > archive.mysite.com.
 >
 > I think:
 >
<font color=purple> > Redirect permanent /archives/ <a style='text-decoration: underline;' href="http://archives.mysite.com/</font" target="_blank">http://archives.mysite.com/</font</a>>
 >
 > ... should do the trick.
 >
 > --
<font color=purple> > David Dorward <a style='text-decoration: underline;' href="http://dorward.me.uk/</font" target="_blank">http://dorward.me.uk/</font</a>><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Mod Rewrite help 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
REWRITE - I have a movie download site and what i need is that if users are linking my files (like http://www.eengoedidee.nl/videoz/bmx/jib.mpg) that they come to a page for the download. Like this..

mod rewrite question - I'm hoping I can get an answer to one of the 4 questions I've posted to this group over the last couple of months, so here goes. I'm serving XHTML files as application/xhtml+xml as they should be. But IE doesn't like this. What I wanted to do was us...

Rewrite to another Port - Hi, can somebody tell me how to make a ReWrite Rule for changing port ? Example: User calls sub.domain.com and rewrite should go to sub.domain.com:82 ? Thanks for your help. Bye, Fabian

ReWrite Rules - Hi, Currently my homepage is http://www.indigoclothing.com/index.shtml However I would now want my homeapge to be: http://www.indigoclothing.com/cgi-bin/page.cgi?d=1&page=homepage The dynamic page is different from the static one as the featured...

rewrite - everybodies favorite... - Hi all, I think mine is a simple but confusing problem... I have a program which accesses a site as such : http://domain.com/code/update?file=filename Now, the "update" is nor a file or directory but I want to make it either rewrite to : ..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]