We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Remove index.php after redirect???

Development and Programming

123ee's avatar
123ee
1 posts
15 years ago
123ee's avatar 123ee

Hi,

I have setup EE without index.php and that works. But when i use

{if segment_1 == ''}
{redirect="/news"}
{/if}

i get mydomain.com/index.php/news/

and not mydomain.com/news

Any idea how i can fix this??

       
ender's avatar
ender
1,644 posts
15 years ago
ender's avatar ender

Admin > System Preferences > General Configuration, check the setting called “Name of your site’s index page”. It probably says “index.php”, you need to clear it out and save.

       
123ee's avatar
123ee
1 posts
15 years ago
123ee's avatar 123ee

@Lab Technician, you are so correct that fixed my issue.

I have found another solution, but not so clean

{if segment_1 == ''}
header("location:http://www.mydomain.com/news");  exit;
{/if}

tx for your solution

       
ender's avatar
ender
1,644 posts
15 years ago
ender's avatar ender

glad it helped 😊

for whatever it’s worth “Lab Technician” (or Summer Student, etc.) is the rather silly rank given to each member for having posted a certain number of times on these forums. The member’s username is just above that line in blue (mine is “ender”, yours is “123ee”). 😉

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.