Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect permanent?

Status
Not open for further replies.

sikek

MIS
Sep 15, 2003
170
US
I'm trying to setup Redirect permanent and it's not working.

Here's what i have some from in httpd.conf thanks for any help.


# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/var/
<Directory "/var/ Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

#
# This should be changed to the ServerRoot/manual/. The alias provides
# the manual, even if you choose to move your DocumentRoot. You may comment
# this out if you do not care for the documentation.
#
AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "/var/
<Directory "/var/ Options Indexes
AllowOverride None
Order allow,deny
Allow from all

<Files *.html>
ScriptAlias /cgi-bin/ "/var/
#
# "/var/ should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/ AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo # Redirect steamingguide.net/ # Directives controlling the display of server-generated directory listings.
#
 
So where's the Redirect permanent directive that's not working?
 
That was my guess even though it's not Redirect permanant. It doesn't work because it's still commented out. The # at the beginning of a line means that the line is just information - it does not get processed by apache. To get apache to process this line, remove the # symbol.
 
Thanks try that still didn't work.






UW PICO(tm) 4.2 File: httpd.conf Modified

<Directory "/var/ Options Indexes
AllowOverride None
Order allow,deny
Allow from all

<Files *.html>
SetHandler type-map
</Files>

SetEnvIf Request_URI ^/manual/de/ prefer-language=de
SetEnvIf Request_URI ^/manual/en/ prefer-language=en
SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>

<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
</IfModule>

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/var/
#
# "/var/ should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/ AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo # Redirect steamingguide.net/index.html Redirect steamingguide.net/ Redirect streamingguide.tv # Directives controlling the display of server-generated directory listings.
#

#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing VersionSort NameWidth=*

#
[ Wrote 1054 lines ]
 
Hi

No, I think that is not correct. The syntax says URL-path, while sikek wrote there a domain name.

I would try to put the [tt]Redirect[/tt] in the VirtualHost section. ( I think there should be such section. )
Code:
<VirtualHost *>
  ServerName steamingguide.net
  Redirect / [URL unfurl="true"]http://streamingguide.net/streamingguide[/URL]
</VirtualHost>

<VirtualHost *>
  ServerName steamingguide.tv
  Redirect / [URL unfurl="true"]http://streamingguide.tv/streamingguide[/URL]
</VirtualHost>
( Just theory. I have no working Apache handy... :-( )

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top