Include Document Root in redirect...

New to mod_rewrite? This is a good place to start.

Include Document Root in redirect...

Postby Iron » Fri Nov 27, 2009 8:46 pm

Hi,

I am an absolute beginner regarding mod_rewrite.

Have a question about a simple redirect.

I have this rule for 404 error:

# 404 is 'Page not found'
ErrorDocument 404 http://www.mysite.com/errors/error.html?error=404

How can I exchange "http://www.mysite.com" dynamically with the DOCUMENT ROOT of the server I am on ?

Reason for asking is, that my development environment always requires a different .htaccess file - since I have to exchange the redirect links...

Thanx for your help in advance !

- M
Iron
 
Posts: 4
Joined: Mon Apr 20, 2009 12:48 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 30 guests

cron