Unstoppable Domains

Subfolder As Index

Spaceship Spaceship
Watch

Maverick

Established Member
Impact
21
I've recently installed a script on one of my sites but the script needed to be installed in a subfolder and the file in the subfolder is a .pl file. So to use the script you have to go at this address (ie http://www.sitename.com/folder/test.pl) but I'd like it to be view at http://www.sitename.com. How can I make this possible? Can I do it by using htaccess redirect?

TIA for any help/guidance. :)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
Make a index.php
<?
include("folder/test.pl");
?>

I am no good at PHP but I believe that this should work.
 
0
•••
I got a parse error when I tried to use the code you provided. :S
 
0
•••
As long as you use any redirect from the main index - it shouldn't really matter ... I use my main index on many sites as only a way to sort different languages - The only problem you may have is that the main folder where your content is Will possibly have more PR and links etc ... later on , so remember to show this if you ever decide to sell it.

Place the following code between your HEAD tags.

Code:
<SCRIPT LANGUAGE="JavaScript">

window.location="http://www.yourdomain.com/";

</script>
 
Last edited:
0
•••
1
•••
cvxes said:
.htaccess

redirect /index.php http://www.domain.com/subdir


Then, make an index.php. Empty, nothing in it...
Thanks cvxes. That one did the trick. :)

And thanks to all who responded and gave their help. :)
 
0
•••
Methods for redirecting:
1. Apache .htaccess (as written before)
2. header() in index.php
3. meta refresh tag in index.html
4. JavaScript in index.html (as written before)
5. include() in index.php (kinda awkward)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer

We're social

Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back