|
Related Topics:
| Redirect all requests to a single page - Hi, I have to redeploy my web I'll have to stop my app server and I dont want my users to see any or of server APACHE errors. How can I configure apache to redirect all the http requests to a single page (to inform..
how to redirect to a given page when .htacess authentifica.. - Hi, how to redirect to a given page when .htacess fails ? Here is my .htacess : 401 AuthName AuthType Basic <limit GET POST> require..
301 redirect - how can i get the below site to do a 301 redirect ? *> ErrorLog CustomLog
How to redirect - I'm my site from static pages which are all called to a PHP solution that will have one standard product page and will take the product code to display as a parameter eg..
URL Redirect - Thanks in advance for reading. I have a question about URLs on an Apache system. (I am running 1.3.26.) I have multiple URLs that are resolving to one IP address. I would like to have Apache redirect all of these URLs to another URL that..
|
|
|
Next: Apache: Problem with xampp and apache
|
| Author |
Message |
External

Since: Sep 05, 2007 Posts: 6
|
(Msg. 1) Posted: Tue Oct 30, 2007 3:00 am
Post subject: redirect page Archived from groups: alt>apache>configuration (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Oct 30, 2007 Posts: 6
|
(Msg. 2) Posted: Tue Oct 30, 2007 10:09 am
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 10:00 am, deggs <deg... DeleteThis @gmail.com> wrote:
> hi,
>
> i have a page ;
>
> www.mydomain.com/pages/page.html
>
> i want people to be able to go to :
>
> www.mydomain.com/page
>
> and get the pages/page.html page.
>
> how can i do this?
>
> i've been messing with redirect and come up with the following, but it
> doesn't work
>
> redirectMatch page pages/page\.html
>
> thanks
RewriteRule ^page$ /pages/page.html [L]
Hope that help >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Sep 05, 2007 Posts: 6
|
(Msg. 3) Posted: Tue Oct 30, 2007 10:31 am
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 10:09 am, clbr <kalbrun.pa... DeleteThis @gmail.com> wrote:
> On Oct 30, 10:00 am, deggs <deg... DeleteThis @gmail.com> wrote:
>
>
>
> > hi,
>
> > i have a page ;
>
> >www.mydomain.com/pages/page.html
>
> > i want people to be able to go to :
>
> >www.mydomain.com/page
>
> > and get the pages/page.html page.
>
> > how can i do this?
>
> > i've been messing with redirect and come up with the following, but it
> > doesn't work
>
> > redirectMatch page pages/page\.html
>
> > thanks
>
> RewriteRule ^page$ /pages/page.html [L]
>
> Hope that help
hi, thanks for the response. does www.mydomain.com/page have to exist
for this to work? if so, just touch a file or something for it? also,
do i have to restart apache after putting the rewrite in .htaccess? >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Oct 30, 2007 Posts: 6
|
(Msg. 4) Posted: Tue Oct 30, 2007 11:16 am
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 10:31 am, deggs <deg....TakeThisOut@gmail.com> wrote:
> On Oct 30, 10:09 am, clbr <kalbrun.pa....TakeThisOut@gmail.com> wrote:
>
>
>
> > On Oct 30, 10:00 am, deggs <deg....TakeThisOut@gmail.com> wrote:
>
> > > hi,
>
> > > i have a page ;
>
> > >www.mydomain.com/pages/page.html
>
> > > i want people to be able to go to :
>
> > >www.mydomain.com/page
>
> > > and get the pages/page.html page.
>
> > > how can i do this?
>
> > > i've been messing with redirect and come up with the following, but it
> > > doesn't work
>
> > > redirectMatch page pages/page\.html
>
> > > thanks
>
> > RewriteRule ^page$ /pages/page.html [L]
>
> > Hope that help
>
> hi, thanks for the response. doeswww.mydomain.com/pagehave to exist
> for this to work? if so, just touch a file or something for it? also,
> do i have to restart apache after putting the rewrite in .htaccess?
1. page folder doesn't need to exist
2. You don't need to restart apache
3. Check in your .htaccess if you have there RewriteEngine on if not
put it in before RewriteRule >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Oct 30, 2007 Posts: 6
|
(Msg. 5) Posted: Tue Oct 30, 2007 11:38 am
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 10:31 am, deggs <deg... DeleteThis @gmail.com> wrote:
> On Oct 30, 10:09 am, clbr <kalbrun.pa... DeleteThis @gmail.com> wrote:
>
>
>
> > On Oct 30, 10:00 am, deggs <deg... DeleteThis @gmail.com> wrote:
>
> > > hi,
>
> > > i have a page ;
>
> > >www.mydomain.com/pages/page.html
>
> > > i want people to be able to go to :
>
> > >www.mydomain.com/page
>
> > > and get the pages/page.html page.
>
> > > how can i do this?
>
> > > i've been messing with redirect and come up with the following, but it
> > > doesn't work
>
> > > redirectMatch page pages/page\.html
>
> > > thanks
>
> > RewriteRule ^page$ /pages/page.html [L]
>
> > Hope that help
>
> hi, thanks for the response. doeswww.mydomain.com/pagehave to exist
> for this to work? if so, just touch a file or something for it? also,
> do i have to restart apache after putting the rewrite in .htaccess?
Folder 'page' doesn't need to exist. Dont need to restart apache. Make
sure you have 'RewriteEngine on' before RewriteRule >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Sep 05, 2007 Posts: 6
|
(Msg. 6) Posted: Tue Oct 30, 2007 11:53 am
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 11:38 am, clbr <kalbrun.pa... DeleteThis @gmail.com> wrote:
> On Oct 30, 10:31 am, deggs <deg... DeleteThis @gmail.com> wrote:
>
>
>
> > On Oct 30, 10:09 am, clbr <kalbrun.pa... DeleteThis @gmail.com> wrote:
>
> > > On Oct 30, 10:00 am, deggs <deg... DeleteThis @gmail.com> wrote:
>
> > > > hi,
>
> > > > i have a page ;
>
> > > >www.mydomain.com/pages/page.html
>
> > > > i want people to be able to go to :
>
> > > >www.mydomain.com/page
>
> > > > and get the pages/page.html page.
>
> > > > how can i do this?
>
> > > > i've been messing with redirect and come up with the following, but it
> > > > doesn't work
>
> > > > redirectMatch page pages/page\.html
>
> > > > thanks
>
> > > RewriteRule ^page$ /pages/page.html [L]
>
> > > Hope that help
>
> > hi, thanks for the response. doeswww.mydomain.com/pagehaveto exist
> > for this to work? if so, just touch a file or something for it? also,
> > do i have to restart apache after putting the rewrite in .htaccess?
>
> Folder 'page' doesn't need to exist. Dont need to restart apache. Make
> sure you have 'RewriteEngine on' before RewriteRule
hi,
i have the following in .htaccess:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.co.uk [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
RewriteRule ^page$ /pages/page.php [L]
but when i go to http://www.mydomain.com/page it just loads a blank
page, it doens't take me to page.php
sorry, i'm trying to direct to a php script, rather than another html
page, should have made that clearer before >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Oct 30, 2007 Posts: 6
|
(Msg. 7) Posted: Tue Oct 30, 2007 12:26 pm
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 11:53 am, deggs <deg....TakeThisOut@gmail.com> wrote:
> On Oct 30, 11:38 am, clbr <kalbrun.pa....TakeThisOut@gmail.com> wrote:
>
>
>
> > On Oct 30, 10:31 am, deggs <deg....TakeThisOut@gmail.com> wrote:
>
> > > On Oct 30, 10:09 am, clbr <kalbrun.pa....TakeThisOut@gmail.com> wrote:
>
> > > > On Oct 30, 10:00 am, deggs <deg....TakeThisOut@gmail.com> wrote:
>
> > > > > hi,
>
> > > > > i have a page ;
>
> > > > >www.mydomain.com/pages/page.html
>
> > > > > i want people to be able to go to :
>
> > > > >www.mydomain.com/page
>
> > > > > and get the pages/page.html page.
>
> > > > > how can i do this?
>
> > > > > i've been messing with redirect and come up with the following, but it
> > > > > doesn't work
>
> > > > > redirectMatch page pages/page\.html
>
> > > > > thanks
>
> > > > RewriteRule ^page$ /pages/page.html [L]
>
> > > > Hope that help
>
> > > hi, thanks for the response. doeswww.mydomain.com/pagehavetoexist
> > > for this to work? if so, just touch a file or something for it? also,
> > > do i have to restart apache after putting the rewrite in .htaccess?
>
> > Folder 'page' doesn't need to exist. Dont need to restart apache. Make
> > sure you have 'RewriteEngine on' before RewriteRule
>
> hi,
>
> i have the following in .htaccess:
>
> Options +FollowSymLinks
> RewriteEngine on
> RewriteCond %{HTTP_HOST} ^mydomain.co.uk [NC]
> RewriteRule ^(.*)$http://www.mydomain.com/$1[L,R=301]
> RewriteRule ^page$ /pages/page.php [L]
>
> but when i go tohttp://www.mydomain.com/pageit just loads a blank
> page, it doens't take me to page.php
>
> sorry, i'm trying to direct to a php script, rather than another html
> page, should have made that clearer before
Comment out this line for a sec RewriteRule ^(.*)$ http://www.mydomain.com/$1
[L,R=301] and check it out.
One time you have .co.uk and later .com. Are you trying to redirection
between servers? >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Sep 05, 2007 Posts: 6
|
(Msg. 8) Posted: Tue Oct 30, 2007 1:46 pm
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 12:26 pm, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
> On Oct 30, 11:53 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
>
>
> > On Oct 30, 11:38 am, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
> > > On Oct 30, 10:31 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > > On Oct 30, 10:09 am, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
> > > > > On Oct 30, 10:00 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > > > > hi,
>
> > > > > > i have a page ;
>
> > > > > >www.mydomain.com/pages/page.html
>
> > > > > > i want people to be able to go to :
>
> > > > > >www.mydomain.com/page
>
> > > > > > and get the pages/page.html page.
>
> > > > > > how can i do this?
>
> > > > > > i've been messing with redirect and come up with the following, but it
> > > > > > doesn't work
>
> > > > > > redirectMatch page pages/page\.html
>
> > > > > > thanks
>
> > > > > RewriteRule ^page$ /pages/page.html [L]
>
> > > > > Hope that help
>
> > > > hi, thanks for the response. doeswww.mydomain.com/pagehavetoexist
> > > > for this to work? if so, just touch a file or something for it? also,
> > > > do i have to restart apache after putting the rewrite in .htaccess?
>
> > > Folder 'page' doesn't need to exist. Dont need to restart apache. Make
> > > sure you have 'RewriteEngine on' before RewriteRule
>
> > hi,
>
> > i have the following in .htaccess:
>
> > Options +FollowSymLinks
> > RewriteEngine on
> > RewriteCond %{HTTP_HOST} ^mydomain.co.uk [NC]
> > RewriteRule ^(.*)$http://www.mydomain.com/$1[L,R=301]
> > RewriteRule ^page$ /pages/page.php [L]
>
> > but when i go tohttp://www.mydomain.com/pageitjust loads a blank
> > page, it doens't take me to page.php
>
> > sorry, i'm trying to direct to a php script, rather than another html
> > page, should have made that clearer before
>
> Comment out this line for a sec RewriteRule ^(.*)$http://www.mydomain.com/$1
> [L,R=301] and check it out.
>
> One time you have .co.uk and later .com. Are you trying to redirection
> between servers?
hi,
i left out the line and get
The requested URL /page was not found on this server.
the other stuff already in .htaccess is trying to direct all spiders/
google etc from mydomain.co.uk to mydomain.com; tell me if this is not
correct, but i guess thats a separate question >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Oct 30, 2007 Posts: 6
|
(Msg. 9) Posted: Tue Oct 30, 2007 7:08 pm
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 1:46 pm, deggs <deg....RemoveThis@gmail.com> wrote:
> On Oct 30, 12:26 pm, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
>
>
> > On Oct 30, 11:53 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > On Oct 30, 11:38 am, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
> > > > On Oct 30, 10:31 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > > > On Oct 30, 10:09 am, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
> > > > > > On Oct 30, 10:00 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > > > > > hi,
>
> > > > > > > i have a page ;
>
> > > > > > >www.mydomain.com/pages/page.html
>
> > > > > > > i want people to be able to go to :
>
> > > > > > >www.mydomain.com/page
>
> > > > > > > and get the pages/page.html page.
>
> > > > > > > how can i do this?
>
> > > > > > > i've been messing with redirect and come up with the following, but it
> > > > > > > doesn't work
>
> > > > > > > redirectMatch page pages/page\.html
>
> > > > > > > thanks
>
> > > > > > RewriteRule ^page$ /pages/page.html [L]
>
> > > > > > Hope that help
>
> > > > > hi, thanks for the response. doeswww.mydomain.com/pagehavetoexist
> > > > > for this to work? if so, just touch a file or something for it? also,
> > > > > do i have to restart apache after putting the rewrite in .htaccess?
>
> > > > Folder 'page' doesn't need to exist. Dont need to restart apache. Make
> > > > sure you have 'RewriteEngine on' before RewriteRule
>
> > > hi,
>
> > > i have the following in .htaccess:
>
> > > Options +FollowSymLinks
> > > RewriteEngine on
> > > RewriteCond %{HTTP_HOST} ^mydomain.co.uk [NC]
> > > RewriteRule ^(.*)$http://www.mydomain.com/$1[L,R=301]
> > > RewriteRule ^page$ /pages/page.php [L]
>
> > > but when i go tohttp://www.mydomain.com/pageitjustloads a blank
> > > page, it doens't take me to page.php
>
> > > sorry, i'm trying to direct to a php script, rather than another html
> > > page, should have made that clearer before
>
> > Comment out this line for a sec RewriteRule ^(.*)$http://www.mydomain.com/$1
> > [L,R=301] and check it out.
>
> > One time you have .co.uk and later .com. Are you trying to redirection
> > between servers?
>
> hi,
>
> i left out the line and get
>
> The requested URL /page was not found on this server.
>
> the other stuff already in .htaccess is trying to direct all spiders/
> google etc from mydomain.co.uk to mydomain.com; tell me if this is not
> correct, but i guess thats a separate question
Regarding rewriting:
IF you have a blank page redirection seems to work. There is no 404
code returned from the server. Maybe your pages/page.php output is
'nothing' or more likely you have an error in there. If so and error
reporting in php is off the as a result you will get empty page. DO
simple test:
type directly http://yourserver/pages/page.php. If blank page come up
the problem is script itself not redirection. >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
External

Since: Sep 05, 2007 Posts: 6
|
(Msg. 10) Posted: Wed Oct 31, 2007 11:35 am
Post subject: Re: redirect page [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Oct 30, 7:08 pm, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
> On Oct 30, 1:46 pm, deggs <deg....RemoveThis@gmail.com> wrote:
>
>
>
> > On Oct 30, 12:26 pm, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
> > > On Oct 30, 11:53 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > > On Oct 30, 11:38 am, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
> > > > > On Oct 30, 10:31 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > > > > On Oct 30, 10:09 am, clbr <kalbrun.pa....RemoveThis@gmail.com> wrote:
>
> > > > > > > On Oct 30, 10:00 am, deggs <deg....RemoveThis@gmail.com> wrote:
>
> > > > > > > > hi,
>
> > > > > > > > i have a page ;
>
> > > > > > > >www.mydomain.com/pages/page.html
>
> > > > > > > > i want people to be able to go to :
>
> > > > > > > >www.mydomain.com/page
>
> > > > > > > > and get the pages/page.html page.
>
> > > > > > > > how can i do this?
>
> > > > > > > > i've been messing with redirect and come up with the following, but it
> > > > > > > > doesn't work
>
> > > > > > > > redirectMatch page pages/page\.html
>
> > > > > > > > thanks
>
> > > > > > > RewriteRule ^page$ /pages/page.html [L]
>
> > > > > > > Hope that help
>
> > > > > > hi, thanks for the response. doeswww.mydomain.com/pagehavetoexist
> > > > > > for this to work? if so, just touch a file or something for it? also,
> > > > > > do i have to restart apache after putting the rewrite in .htaccess?
>
> > > > > Folder 'page' doesn't need to exist. Dont need to restart apache. Make
> > > > > sure you have 'RewriteEngine on' before RewriteRule
>
> > > > hi,
>
> > > > i have the following in .htaccess:
>
> > > > Options +FollowSymLinks
> > > > RewriteEngine on
> > > > RewriteCond %{HTTP_HOST} ^mydomain.co.uk [NC]
> > > > RewriteRule ^(.*)$http://www.mydomain.com/$1[L,R=301]
> > > > RewriteRule ^page$ /pages/page.php [L]
>
> > > > but when i go tohttp://www.mydomain.com/pageitjustloadsa blank
> > > > page, it doens't take me to page.php
>
> > > > sorry, i'm trying to direct to a php script, rather than another html
> > > > page, should have made that clearer before
>
> > > Comment out this line for a sec RewriteRule ^(.*)$http://www.mydomain.com/$1
> > > [L,R=301] and check it out.
>
> > > One time you have .co.uk and later .com. Are you trying to redirection
> > > between servers?
>
> > hi,
>
> > i left out the line and get
>
> > The requested URL /page was not found on this server.
>
> > the other stuff already in .htaccess is trying to direct all spiders/
> > google etc from mydomain.co.uk to mydomain.com; tell me if this is not
> > correct, but i guess thats a separate question
>
> Regarding rewriting:
> IF you have a blank page redirection seems to work. There is no 404
> code returned from the server. Maybe your pages/page.php output is
> 'nothing' or more likely you have an error in there. If so and error
> reporting in php is off the as a result you will get empty page. DO
> simple test:
> type directlyhttp://yourserver/pages/page.php. If blank page come up
> the problem is script itself not redirection.
hi,
if i go directly to the http://mydomain.com/pages/page.php like you
said, everything is ok. it displays what it should do - the php page
is ok.
so, how come the redirect isn't working? >> Stay informed about: redirect page |
|
| Back to top |
|
 |  |
|