News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Rewrite /index.php to base?

Started by NewCoder, January 21, 2010, 08:27:09 PM

Previous topic - Next topic

NewCoder

I'm wondering how to rewrite index.php to base so it won't be /forum/index.php anymore.


I guess it's done using .htacess on apache but no idea how.

Thanks all.

Nick Whetstone

So, you want to make it http://yourdomain.com/index.php to access SMF instead of http://yourdomain.com/forum/index.php ? Is SMF not located in your /forum directory?
The artist formerly known as (Ha)²

Former Support Specialist

Please do not solicit support via PM. Here's why!

Arantor

There's two things this could be.

example.com/forum/index.php -> example.com/index.php

OR

example.com/forum/index.php -> example.com/forum

The latter can be achieved with SimpleSEF from what I remember.
Holder of controversial views, all of which my own.


NewCoder

No neither of those.

I mean when I access my forum it is mysite.com/forum [nofollow]

But if I click on home it is then mysite.com/forum/index.php [nofollow]

Which means the homepage of forum is duplicated on two url's. Not good for the search engines. I'm needing to rewrite it so that no matter what happens it is always mysite.com/forum [nofollow]

Thanks.

P.S: I see I have to eneter a capcha everytime I want to add a post here.. is this going to have to be on my forms to stop spammers or are there better ways? as I don't think it's viable for most communities.

Arantor

Last question first: CAPTCHA is an admin-controlled feature in 2.0, it's set to only the first 10 posts to stop spammers here.

Actually, no, since every single possible link in the forum starts with index.php (and I mean *every* link) you would be better considering a rewrite from /forum to /forum/index.php. Our "Community" link points to /community/index.php just fine.

Or as I said installing SimpleSEF which should take care of it.
Holder of controversial views, all of which my own.


NewCoder

Quote from: Arantor on January 22, 2010, 10:51:10 AM

Or as I said installing SimpleSEF which should take care of it.

I already have the SEO url's modification added. Will it be Ok to add simeplSEF along with it or will I need to remove it first?

Thanks.

Arantor

You didn't mention that, you might want to ask in the support thread for the existing pretty URLs mod you already have (since really it has little or no SEO benefit)
Holder of controversial views, all of which my own.


Nick Whetstone

I don't think adding SimpleSEF to Pretty URLs would be of any benefit (if it worked at all) since their main features both included re-writing URLs.
The artist formerly known as (Ha)²

Former Support Specialist

Please do not solicit support via PM. Here's why!

NewCoder

Quote from: Ha² on January 23, 2010, 11:22:16 AM
I don't think adding SimpleSEF to Pretty URLs would be of any benefit (if it worked at all) since their main features both included re-writing URLs.

Thanks

Is it recommened to change from PrettyURL's to the SimpleSEF? And is it possible?

Cheers.

Nick Whetstone

Hey NewCoder, is this issue now resolved?

It's really a matter of personal preference. They each have a few benefits in comparison to the other (IMO), but they both accomplish the same main task, which is rewriting URLs.
The artist formerly known as (Ha)²

Former Support Specialist

Please do not solicit support via PM. Here's why!

Advertisement: