|
|
#1 |
|
New Member
![]() Join Date: Feb 2010
Posts: 6
|
Hi...
I'm new to PHP. I have a number of Wordpress sites up and running smoothly. I want to know how Wordpress always executes index.php even via the URL http:\\www.mysite.com\2010\10\blog_title. If I attempt that on my non-wordpress php site, I get a Page Not Found error. How do they do that? Thanks in advance... Ron... |
|
|
|
|
|
#2 |
|
Gold Member
![]() Join Date: Oct 2010
Posts: 388
|
They are using a server code, i don't know for sure what they doing, but one of the possibilities is that they are coded the .htaccess file to handle the 404 (page not found) error to direct you to the main index page.
The code for the .htaccess file is HTML Code:
ErrorDocument 404 /index.php ![]() - Enjoy. ____________________ contact@smoovo.com www.SMooVo.com – Web Design |
|
|
|
|
|
#3 |
|
New Member
![]() Join Date: Feb 2010
Posts: 6
|
Thanks...
I will check that out... Ron... |
|
|
|
|
|
#4 |
|
New Member
![]() Join Date: Feb 2010
Posts: 6
|
smoovo...
Thanks again for your input... I think that my Wordpress site is doing something with the .htaccess file... However, I do not seem to have access to this file or to the php5.ini file... Any other thoughts about handling the 404 error in any other method ?... Ron... |
|
|
|
|
|
#5 |
|
Gold Member
![]() Join Date: Oct 2010
Posts: 388
|
I found this http://wordpress.org/extend/plugins/redirection/.
I hope it covers your version and problem. Post here answer if it been solved .
|
|
|
|
|
|
#6 |
|
New Member
![]() Join Date: Feb 2010
Posts: 6
|
smoovo...
Thanks AGAIN for your input... That Redirection plugin may be useful to me in the future... But my question at hand is with my Non-Wordpress site... I would like to have the site execute index.php even when the url is something like http:\\www.mysite.com\2010\10\blog_title... My Wordpress site does this, but I'm not sure how - you suggested an entry in the .htaccess file - but I don't have access to this file on my GoDaddy hosted site... Any ideas?... You have done more for me than anyone else - so again - I thank you... Ron... |
|
|
|
|
|
#7 |
|
Gold Member
![]() Join Date: Oct 2010
Posts: 388
|
My pleasure Ron.
![]() I understood you need it for your Wordpress and you just don't have access to that (with Wordpress), sorry. So if you have Godaddy hosting account it's very simple: Open notepad and copy/paste the script line i gave you, after you finish go to File > Save As... In the "Save As" window change the "Save as type" to "All Files". Name the file ".htaccess", without quotes, and without file name before the dot. Upload this file to your FTP root folder, and do test. Type some file name that doesn't exist and see if it's working (it's work like a charm). ![]() - Enjoy. |
|
|
|
![]() |
| Tags |
| url, url handling, wordpress |
| Thread Tools | |
| Display Modes | |
|
|