![]() | | ||||||||
| | #1 |
| roycecheng.com Join Date: Nov 2008 Location: Singapore
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
hi everyone! I got a query.. How do I remove the index.php from my URL? I heard I have to edit .htaccess, but I totally have no idea how to go about doing it and is afraid of removing any important stuffs. example: example.com/index.php/blog-title Experts, please help! ![]() [Case closed] |
|
My Blog: http://www.roycecheng.com | |
| | |
| | #2 |
| Web Developer Join Date: Nov 2008 Location: Asheville, NC USA
Posts: 420
Thanks: 18
Thanked 57 Times in 51 Posts
|
The example you gave is nonsensical, as there is no way to create a directory within a page. You can link to the root without linking to index.php, just by linking to a forward slash: HTML Code: <a href="/">Home</a> |
| Wayfarer | join me on StoryBlorg | |
| | |
| | #3 | |
| Advanced Warrior War Room Member Join Date: Sep 2007 Location: hong kong
Posts: 933
Blog Entries: 2 Thanks: 3
Thanked 39 Times in 34 Posts
|
killua, not quite understand of what you are asking.. the index.php (or index.html) are the default web pages that most web server to configure showing up if someone type for example http://www.xyz.com/ on the users browsers. and are you asking how default goes to http://www.example.com/blog-title/ when some one types in your domain? well then you can add a php redirect to the directory /blog-title/ or you can do htaccess to create a permanent 301 redirect (which also tells the search engine to skip your default home page and index the new directory) I personally prefer to use php redirect because it is much easier: (just one line code in your index page and that's it. the code: Quote:
hopes that help | |
| | ||
| | |
| | #4 | |
| Advanced Warrior War Room Member Join Date: Sep 2007 Location: hong kong
Posts: 933
Blog Entries: 2 Thanks: 3
Thanked 39 Times in 34 Posts
|
killua, not quite understand of what you are asking.. the index.php (or index.html) are the default web pages that most web server to configure showing up if someone type for example http://www.xyz.com/ on the users browsers. and are you asking how default goes to http://www.example.com/blog-title/ when some one types in your domain? well then you can add a php redirect to the directory /blog-title/ or you can do htaccess to create a permanent 301 redirect (which also tells the search engine to skip your default home page and index the new directory) I personally prefer to use php redirect because it is much easier: (just one line code in your index page and that's it. the code: Quote:
hopes that help | |
| | ||
| | |
| | #5 |
| roycecheng.com Join Date: Nov 2008 Location: Singapore
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
I'm sorry that I did not explain clearly in my first post. If you willing to check on my blog, you will be able to see that for the URL of my every post, it is indicated as roycecheng.com/index.php/YYYY/MM/blog-title/ How do I make the index.php disappear from the URL? Your help is greatly appreciated. =) |
|
My Blog: http://www.roycecheng.com | |
| | |
| | #6 |
| HyperActive Warrior Join Date: May 2008 Location: USA
Posts: 249
Blog Entries: 22 Thanks: 9
Thanked 29 Times in 27 Posts
|
Hello killua, Check your Wordpress settings. There two items you might need to adjust,
|
| Exciting comment opportunities on my WF blog: (1) Better money with better marketing (2) Forming strong customer bonds (3) Earn more money with DB marketing (4) Building a revenue and profit model | |
| | |
| | #7 |
| roycecheng.com Join Date: Nov 2008 Location: Singapore
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
hmm.. they are both indicated as roycecheng.com only.
|
|
My Blog: http://www.roycecheng.com | |
| | |
| | #8 |
| roycecheng.com Join Date: Nov 2008 Location: Singapore
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
Thanks guys! I had figured out already. I have to insert: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> into my .htaccess file. |
|
My Blog: http://www.roycecheng.com | |
| | |
| | #9 |
| HyperActive Warrior Join Date: May 2008 Location: USA
Posts: 249
Blog Entries: 22 Thanks: 9
Thanked 29 Times in 27 Posts
|
Cool, I knew it must be something simple that was trying to re-write each URL. Great blog by the way. I'll be interested to see more from you. Thanks!
|
| Exciting comment opportunities on my WF blog: (1) Better money with better marketing (2) Forming strong customer bonds (3) Earn more money with DB marketing (4) Building a revenue and profit model | |
| | |
| | #10 |
| roycecheng.com Join Date: Nov 2008 Location: Singapore
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
haha. ya. its simple.. i overlooked it. wordpress actually teaches how to remove it. so sorry. thanks! my blog is just reflecting on my life. i really want to learn more about internet marketing. very new to it. hope the people here will be able to help if i face any difficulties. =) |
|
My Blog: http://www.roycecheng.com | |
| | |
![]() |
|
| Tags |
| index.php, indexphp, remove, url |
| Thread Tools | |
| |
![]() |