CodeIgniter Forums
routes help - adds question mark. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: routes help - adds question mark. (/showthread.php?tid=24951)

Pages: 1 2


routes help - adds question mark. - El Forum - 11-26-2009

[eluser]Jeroen Brussich[/eluser]
Code:
RewriteEngine on

RewriteCond $1 ^blog$
RewriteRule ^(.*)$    http://blog.mysite.com [R,L]

RewriteCond $1 ^services/seo$
RewriteRule ^(.*)$    /services/search-engine-optimization [R,L]

RewriteCond $1 ^services/hosting$
RewriteRule ^(.*)$    /services/secure-web-hosting [R,L]

RewriteCond $1 ^services/design
RewriteRule ^(.*)$    /services/web-design [R,L]

RewriteCond $1 ^services/email$
RewriteRule ^(.*)$    /services/complete-online-marketing [R,L]


RewriteCond $1 !^(index\.php|images|user_guide|robots\.txt)
RewriteRule ^(.*)$     /index.php/$1 [L]

Delete your .htaccess and use the code above.
I've tested in and it works.

edit: I think it is safe to go back on the AUTO-protocol


routes help - adds question mark. - El Forum - 12-01-2009

[eluser]dippy[/eluser]
Thanks for your help. greatly appreciated


routes help - adds question mark. - El Forum - 12-01-2009

[eluser]dippy[/eluser]
[quote author="Jeroen Brussich" date="1259247212"]
Code:
RewriteEngine on

RewriteCond $1 ^blog$
RewriteRule ^(.*)$    http://blog.mysite.com [R,L]

RewriteCond $1 ^services/seo$
RewriteRule ^(.*)$    /services/search-engine-optimization [R,L]

RewriteCond $1 ^services/hosting$
RewriteRule ^(.*)$    /services/secure-web-hosting [R,L]

RewriteCond $1 ^services/design
RewriteRule ^(.*)$    /services/web-design [R,L]

RewriteCond $1 ^services/email$
RewriteRule ^(.*)$    /services/complete-online-marketing [R,L]


RewriteCond $1 !^(index\.php|images|user_guide|robots\.txt)
RewriteRule ^(.*)$     /index.php/$1 [L]

Delete your .htaccess and use the code above.
I've tested in and it works.

edit: I think it is safe to go back on the AUTO-protocol[/quote]

worked. but for some odd reason it wasn't pulling in the style sheets... my site was flat.
and it would not load any other pages. just the home page. if i went to /services or /about i get the homepage...


routes help - adds question mark. - El Forum - 12-01-2009

[eluser]dippy[/eluser]
i took banafederico advice and took out the \? and added the REQUEST_URI and seems to be working now...

thanks again