Prob. pointing mydomain.com to mydomain.com/x/x/


#1

Hello guys.

I am trying to set up a rather simple online store, but I am a total newbie and I am full of doubts. The one that irks me the most at this time is how I can redirect my visitors from www.mydomain.com to www.mydomain.com/whatever/myshop/indexname.php

I haven’t see an answer looking into the knowledge base or this very forum, so here I am.

PS: I’ve tried to change the web directory from /home/mydom/mydomain.com to /home/mydom/mydomain.com/whatever/myshop/ but so far it doesn’t work :-/

Edit: Now it works but the whole shop is broken into pieces, I’ll try to reinstall everything =(


#2

You can do such a redirect with a .htaccess file with this line:

RedirectMatch ^/$ http://www.mydomain.com/whatever/myshop/indexname.php

But I don’t know why you don’t just upload the main index to the main directory of the site in the first place.

– Dan


#3

If you’re uncomfortable with messing with your .htaccess file, create a plain text document with the just the following line (no white space):

<?php header('Location: http://www.mydomain.com/whatever/myshop/indexname.php'); ?>

Save that as index.php and upload it to your main directory. This will forward all visits from www.mydomain.com to www.mydomain.com/whatever/myshop/indexname.php.


MacManX.com


#4

Do I have to put just that line on the .htaccess file?

Thank you :slight_smile:


#5

Looks like everything is fine right now, thanks :slight_smile: