Welcome Guest, Not a member yet? Register   Sign In
Return URI Segment
#1

[eluser]rash[/eluser]
Hi,

I have a site http://www.baxobeat.com

When i click on Login button it goes to http://www.baxobeat.com/home/logIn this link. When i serch the code i found this lines of code. where home, login are not directories.

$page_name = $this->uri->segment(2);
$controller_name = $this->uri->segment(1);

I didn't get this code.

Now i want to change the code file into http://aapkapaper.com/demo/Baxobeat link. But the inner pages are not found. It shows 404 error.

I don't know about uri segment...so how can i solve it....

can anyone help for this..............

Thanks in advance..
#2

[eluser]LuckyFella73[/eluser]
Quote:Now i want to change the code file into http://aapkapaper.com/demo/Baxobeat link.

Du you mean you want to have the same functionality but instead of calling
"home/logIn" you want to have "demo/Baxobeat" in your URL?
#3

[eluser]rash[/eluser]
no i want to change the link as

http://aapkapaper.com/demo/Baxobeat/home/login
#4

[eluser]rash[/eluser]
i mean i want to put the file into aapkapaper domain in demo folder as Baxobeat folder....

Previously it was on baxobeat domain.
#5

[eluser]LuckyFella73[/eluser]
Did you move the whole application to the new destination?
If yes the code should work as before. Maybe you have to
edit the htaccess file (rewriteBase).
#6

[eluser]rash[/eluser]
yes i want to move the whole application to the new destination, but after moving when i click the login button it shows the 404 error, can u please say why is this??

Real link
http://www.baxobeat.com/

after changing the application to new destination this is the link
http://aapkapaper.com/demo/Baxobeat/

Please check it..........

thank u...
#7

[eluser]LuckyFella73[/eluser]
Did you edit the .htaccess file like suggested? Try to set
the rewriteBase according to the new location and see what
happens.
#8

[eluser]rash[/eluser]
i tried it but no changes has been occured......

there are many .htaccess files which one i change??
#9

[eluser]LuckyFella73[/eluser]
It would be the .htaccess in your root directory (where your index.php is
located).

There are different ways to set up a .htaccess file depending on the
server environment and what exactly you want to achieve.

An example .htaccess that works for my needs:
Code:
<IfModule mod_rewrite.c>

Options +FollowSymLinks

# Turn on the Rewrite Engine
RewriteEngine On

# modified allready for your url:
RewriteBase /demo/Baxobeat/

# If the file or directory exists, show it
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]

# Blank queries get sent to the index
RewriteRule ^$ index.php [L]

# All other queries get sent to the index as index.php/whatever
RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

If that doesn work for you do some research about .htaccess files
and Codeigniter. There are many posts about that kind of issues.

A good start before doing te research would be reading about the
basics:
http://ellislab.com/codeigniter/user-gui.../urls.html

Hope that helps
#10

[eluser]rash[/eluser]
Thank u for the reply but, when i put the .htaccess file on root directory it show some errors i.e.:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


can you help for this error.........




Theme © iAndrew 2016 - Forum software by © MyBB