|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
redirect index.html to index.php, how to do this in apache
redirect index.html to index.php, how to do this in apach?
whenever it hits index.html it will redirect to index.php. can u show me in apache? |
|
#2
|
||||
|
||||
|
Do you need to redirect any .html file to the corresponding .php file? or are you trying to have Apache show a php page when you don't specify one (i.e., http://domain.com/ would load index.php).
Instead of redirecting, you may get the result you're looking for by adding index.php to the DirectoryIndex directive in your httpd.conf file. |
|
#3
|
|||
|
|||
|
Ok, aside from the bad english, which I know can be a hard laguage to learn. (Most Americans dont speek proper english :P)
This post should have been posted in the Apache forum. You would get a faster and better response if it were in that forum. Eclipce
__________________
Baptism By The Scriptures | Fifty Objections to Baptism Answered | HTML Bible | God's Salvation Plan Lifetime Residual Income |
|
#4
|
|||
|
|||
|
whenever index.html is hit , it will re-direct to index.php.
my poor english is OK. |
|
#5
|
|||
|
|||
|
If for a specific page:
<meta http-equiv="refresh" content="0;URL=index.php"> If for all, look for DirectoryIndex and add index.php to the list. Last edited by mttatkns : May 7th, 2003 at 06:48 PM. |
|
#6
|
||||
|
||||
|
Quote:
I'm wondering why you want a redirect rather than modifying your httpd.inc |
|
#7
|
|||
|
|||
|
You don't want a redirect. You want a "Rewrite rule". Post this question in the Apache forum and ask how to do this with mod_rewrite.
__________________
The real n-tier system: FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL Amazon wishlist -- rycamor (at) gmail.com |
|
#8
|
||||
|
||||
|
Code:
RewriteEngine On RewriteRule ^index\.html$ /index.php [L] Drop that in a .htaccess file and put in directory. Should work...
__________________
~ Joe Penn |
|
#9
|
||||
|
||||
|
I'm still trying to figure out why we can't just change the DirectoryIndex ???
Code:
# .htaccess DirectoryIndex index.php |
|
#10
|
|||
|
|||
|
Quote:
![]() |
|
#11
|
||||
|
||||
|
Not sure - he said he wanted a re-direct, so thats what I gave him (I think)
![]() |
|
#12
|
||||
|
||||
|
will that rewrite work if we go to a directory
http://somedomain.com/ Will that take us to index.html, and then redirect to index.php? |
|
#13
|
||||
|
||||
|
Lets try
Trying . . . . . . . YES - it will also hide the page. So, if your site address is this -> somesite.com And the request is that, and your index is index.html - using the rewrite you can do this -> Code:
RewriteEngine On RewriteRule ^index\.html$ /some_dir/blah/blah/blah/index.php [L] The request would be sent to somesite.com/some_dir/blah/blah/blah/index.php but would actually show the address as somesite.com... |
|
#14
|
||||
|
||||
|
Quote:
Sorry but that is extremely debatable given your recent thread ![]()
__________________
--------------------- -- SilkySmooth -- --------------------- Proxy | Little Directory |
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > redirect index.html to index.php, how to do this in apache |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|