/    Sign up×
Community /Pin to ProfileBookmark

I have a simple question which I can’t sort out though. Can someone please help me?

I want to add a line to the .htaccess file that if some enters my domain name ie [url]www.mydomainname.com[/url] it rewrites the url to [url]www.mydomainname.com/Home[/url].

Hopefully someone can do this. thanks.

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@lordspaceMar 01.2007 — do you try to accomplish this ?

<?php

header("Location: /Home");

?>
Copy linkTweet thisAlerts:
@stephan_gerlachauthorMar 01.2007 — yes but i dont want to do it via php
Copy linkTweet thisAlerts:
@lordspaceMar 01.2007 — what do you need ?

1) front page to be redirected to /home

or

2) or everything to root "/" to be redirected to /home/some-thing.html ?

why do you need that I am just curious ?
Copy linkTweet thisAlerts:
@stephan_gerlachauthorMar 01.2007 — i need to so that when someone enters www.mydomain.com it actually loads www.mydomain.com/Home.

I need it because of the framework i wrote to develop websites in. If I use the php header function it returns a 302 to the browser which I dont mind getting on pages but I dont want to get it on the first page. Thats why I want to do a mod rewrite
×

Success!

Help @stephan_gerlach spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...