user1801426
user1801426

Reputation:

.htaccess invisible redirect to page within subfolder

I've tried many options in .htaccess without success. What I want to do is this:

I have Wordpress residing in its own folder, like this: site.com/folder

I want all users visiting site.com to be redirected to site.com/folder/page but in such a way that the URL doesn't change in the browser. All other URLs, such as site.com/folder and site.com/folder/page1 etc shouldn't be affected.

How to do this, in as SEO-friendly way as possible?

Thanks everyone.

Upvotes: 2

Views: 1058

Answers (1)

FIG-GHD742
FIG-GHD742

Reputation: 2486

You can't redirect a user to a other page from serverside without to show this to the use. But if you need, you can use the HTML tag <frame> http://www.w3schools.com/tags/tag_frame.asp But the bad side with this is the use always will be show "site.com" and not the real page.

But I think the best way is to proxy the result, in Apache you can do this by something like this.

RewriteEngine ON
RewriteRule ^/$ folder/page/index.php [L]

Upvotes: 1

Related Questions