Hello.
Please help me to configure a simple mod-rewrite rewrite rule.
I have a folder, named "pyramide" in my httpdocs folder, where my site files are. So the site is reachable by this url:
http://example.com/pyramide/ .
I can not move my site physically one level up because of some technical reasons. But I need it to be reachable by the domain root:
http://example.com/
Thank you.
When someone reaches your site at http://example.com/ you want that this is translated as http://example.com/pyramide/
You can do that in 2 ways:
1 - create an Apache mod-rewrite within and .htaccess file
2 - create a php rewrite within index.php (I assume you have php since you post in tyhe php area)
The basic expression for 1 would be
Redirect 301 ^http://example.com$ http://example.com/pyramide/
The basic expression for 2 would be a file index.php containing just
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://example.com/pyramide/");
exit;
?>