Forum Index Search Forum Register Log in

Runs on XP to Win 8.1

Current

Download 7.0

Download 7.1 Beta5 upgrade



A donation makes a contribution towards the time and effort that's going in to running this site.

Steffen

Contact:
My mail address is
at the top of the paypal form :

Your donations will help to keep this site alive and well.

htaccess redirect help

 
Post new topic   Reply to topic    Sambar Forum Index -> Coding & Script Corner
View previous topic :: View next topic  
Author Message
robotech



Joined: 19 Nov 2005
Posts: 2

PostPosted: Sat 19 Nov '05 20:22    Post subject: htaccess redirect help Reply with quote

Hi
I have re-arranged a site with the Samber server ver 6.1 installed
some web pages extentions where changed from html to PHP
I need a htaccess file to redirect to the new pages

Example
/test/test2.html page changed to /test/test2.php
If the URL is www.foobar/test/test2.html i need the test2.php to be displayed

I have tried
RedirectMatch permanent (.*)\.html$ $1.php
but it does not work

any help would be great.

Thanks Robotech Embarassed
Back to top
View user's profile
Steffen



Joined: 07 Jun 2004
Posts: 406
Location: Netherlands

PostPosted: Sat 19 Nov '05 22:56    Post subject: Reply with quote

Looks like we cannot use $1 like in Apache mod-rewrite.

The docu says:
Redirect all requests that match the regular-expression (<regex-match>) to the URL specified. So a fixed URL.

An idea is that you replace the .html files with :

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Loading</title>
<meta http-equiv="refresh" content="0; url=http://www.xxxx.xx/yyy.php" />
</head>

<body bgcolor="#FFFFFF">
<p>Loading <b>http://www.xxxx.xx/yyy.php</b>....</p>

<p>If the page does not load within a few seconds, please click here: <a href="http://www.xxxx.xx/yyy.php">click here</a></p>


</body>
</html>

Steffen
Back to top
View user's profile Visit poster's website

Post new topic   Reply to topic    Sambar Forum Index -> Coding & Script Corner
Page 1 of 1