Welcome Guest, Not a member yet? Register   Sign In
Redirecting to domain.tld
#1

[eluser]mfroseth[/eluser]
Hey all,
I'm working with CodeIgniter on a small form based site. The URL is: http://www.legacysafeguarduniversity.com...tart/omaha

Now, for the life of me I cannot figure out why it keeps redirecting to domain.tld/omaha

I've modified .htaccess

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

Anyone have this issue before?

Thanks,
#2

[eluser]mfroseth[/eluser]
Anyone? Can't imagine this is a one time issue?
#3

[eluser]PhilTem[/eluser]
The forums were not accessible over the past few days so go easy on us Wink

Your RewriteBase is totally wrong, that's why it keeps redirecting you. Should be
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /faststart/omaha/
[...]

Try it and enjoy Wink
#4

[eluser]mfroseth[/eluser]
This is what I did:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /faststart/

    ### Canonicalize codeigniter URLs

    # If your default controller is something other than
    # "welcome" you should probably change this
    RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]
    RewriteRule ^(.*)/index/?$ $1 [L,R=301]

    # Removes trailing slashes (prevents SEO duplicate content issues)
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/$ $1 [L,R=301]

    # Enforce www
    # If you have subdomains, you can add them to
    # the list using the "|" (OR) regex operator
    RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
    RewriteRule ^(.*)$ http://www.legacysafeguarduniversity.com/faststart/$1 [L,R=301]

    # Enforce NO www
    #RewriteCond %{HTTP_HOST} ^www [NC]
    #RewriteRule ^(.*)$ http://legacysafeguarduniversity.com/faststart/$1 [L,R=301]

    ###

    # Removes access to the system folder by users.
    # Additionally this will allow you to create a System.php controller,
    # previously this would not have been possible.
    # 'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]

    # Checks to see if the user is attempting to access a valid file,
    # such as an image or css document, if this isn't true it sends the
    # request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

<IfModule !mod_rewrite.c>

    # Without mod_rewrite, route 404's to the front controller
    ErrorDocument 404 /index.php

</IfModule>

Is that still wrong? Doesn't seem to be working?
#5

[eluser]mfroseth[/eluser]
Sorry, I should explain that there are multiple pages that people should be able to access. The first page can be seen at: http://www.legacysafeguarduniversity.com/faststart/

However, the one I am currently working on is http://www.legacysafeguarduniversity.com...tart/omaha
#6

[eluser]mfroseth[/eluser]
I've even completely deleted .htaccess in the /faststart/ folder. Would a different .htaccess in the root of my httpdocs be causing this problem? I'm clueless right now, hehe.
#7

[eluser]mfroseth[/eluser]
Anyone?
#8

[eluser]machouinard[/eluser]
I experienced this myself for a minute tonight. I had neglected to change domain.tld to my domain in some code I copied and pasted into my .htaccess. Changing or deleting .htaccess didn't help. After flushing my browser cache all was well. Good luck!

Mark
#9

[eluser]Unknown[/eluser]
Don't forget to check your base url set within your config file Smile




Theme © iAndrew 2016 - Forum software by © MyBB