Welcome Guest, Not a member yet? Register   Sign In
Anyone able to offer some .htaccess suggestions?
#1

[eluser]Myles Wakeham[/eluser]
I am using .htaccess successfully with my CI systems to hide the index.php calls, which works great. However my applications typically have 'static' content and 'active' content. The static content just represent plain HTML pages with information (like Products, Features, Services, About Us, etc.) and my 'Active' content contains the information pertaining to what is coming from the database, etc.

I have typically used a Welcome controller for my static content, which works great. Lots of small functions to just basically send a page back on request. I could do this without CI involved, but I need some security checks on this data anyway, so the controller serves that well.

However it means that all incoming URLs for this static content looks like this:

http://www.blah.com/Welcome/aboutus
or
http://www.blah.com/Welcome/products

and I need to lose the Welcome part so that I get the max Google juice out of this.

Does anyone have any examples of a way in .htaccess that I can list the particular function calls that I want to support without the 'Welcome' controller reference in there, and have mod_rewrite just add the Welcome part in front of it? I'm no expert on RegExp and I'm sure I'm probably not the only one doing this sort of thing, so rather than re-invent the wheel I was hoping someone could give some guidance. I just need to have it so that http://www.blah.com/products gets resolved to http://www.blah.com/Welcome/products or http://www.blah.com/index.php/Welcome/products

Thanks
Myles
#2

[eluser]danmontgomery[/eluser]
user guide
#3

[eluser]Myles Wakeham[/eluser]
[quote author="noctrum" date="1276727014"]user guide[/quote]

So are you suggesting using routing for this rather than .htaccess / mod_rewrite?

Myles
#4

[eluser]danmontgomery[/eluser]
[quote author="Myles Wakeham" date="1276727487"][quote author="noctrum" date="1276727014"]user guide[/quote]

So are you suggesting using routing for this rather than .htaccess / mod_rewrite?

Myles[/quote]

Yes

The only reason to use mod_rewrite is if you were actually using static html files and you wanted to exclude them from being routed through CI.
#5

[eluser]Myles Wakeham[/eluser]
[quote author="noctrum" date="1276727581"]Yes

The only reason to use mod_rewrite is if you were actually using static html files and you wanted to exclude them from being routed through CI.[/quote]

Gotcha. Thanks.

Myles




Theme © iAndrew 2016 - Forum software by © MyBB