WordPress Url Handling

Barber77r

New Member
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...
 

smoovo

New Member
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:
ErrorDocument 404 /index.php

It's a trick, by default there is a page contains a message for this error, but you can change this path to the main index page path. :)

- Enjoy.

____________________
[email protected]
www.SMooVo.com – Web Design
 

Barber77r

New Member
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...
 

Barber77r

New Member
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...
 

smoovo

New Member
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). :cool:

- Enjoy.
 
Top