/    Sign up×
Community /Pin to ProfileBookmark

htaccess options

Hello,

I would like to know if it is possible to force the default page to show when a domain is loaded.

That is, forcing it to show. If some goes to [url]www.domain.com/[/url] they would automatically get redirected to [url]www.domain.com/index.php[/url].

I’ve tried the following htaccess rule:

Redirect /localhost:8080/modxmg /localhost:8080/modxmg/index.php

but it does not work. I am not knowledgeable of htaccess beyond what I’ve seen as examples.

to post a comment
Full-stack Developer

2 Comments(s)

Copy linkTweet thisAlerts:
@ray326Feb 23.2008 — The easiest way to do that is to make index.php one of the available index pages.

http://bignosebird.com/apache/a2.shtml
Copy linkTweet thisAlerts:
@TyeMauthorFeb 23.2008 — I know about using Directory Index.

I am not trying to load the page automatically. I am trying to have the page show in the url.

The problem is I have a PHP script which gets the currentpage and passes it on to another page. If that page is www.domain.com/<empty>, it passes the empty which is useless to me, where as what I need is for it pass <index.php>. By default that does not show.
×

Success!

Help @TyeM 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...