Could we add ajax requests disallow in robots.txt in codeigniter - ajax

My question is that could we add ajax requests disallow in robots.txt in codeigniter
And is that compulsory to add robots.txt file in home directory or we place it in views with defined routes

Related

how to create Robots.txt fole in Laravel?

how to create Robots.txt file in Laravel??
when i try to access my Robots.txt file by url it show blank page
https://wallpaperaccess.in/robots.txt

Need to change hmvc routes in CodeIgniter

I have CodeIgniter HMVC application and I want to change route as per requirement.
Now I have website/product/detail/url, and I want to change it with website/url.
Once I set URL from admin side it will redirect to my route.
This is what I have now:
$route['Products'] = "Products/detail/d101productdatatest(this is url)";
And I want in my url like website/url and it will open same page what I have with website/product/detail/url
From the given library:
https://www.codeigniter.com/userguide3/general/routing.html
routes as above:
$route['controller/function'] ='website/Products/detail/d101productdatatest';
But as per your given question:
you cannot manipulate url using routes
you can map same function with different url using routes
you have to use .htaccess to redirect to specific url after hitting the previous given url.
htaccess example:
Redirect /index.html /new/
Redirect /index.html /default.html
Redirect /private/ http://www.example.com/private/
Redirect /img/logo.gif http://www.example.com/images/logo.gif
Hope this answer helps you out !!
cheers

LARAVEL Sub Domain Routing Not Executed

Hi there i have some stupid mistake in configuring laravel.
First of all, this is my structure of folder
i use shared-hosting service and i place my laravel app, vendor and bootstrap into lib folder outside the htdocs (public/public_html) folder
so basically:
var
public_html
www
lib
-app
-bootstrap
-vendor
i create two subdomain called console for client and panel for admin
so i could call the subdomain specific url to access the system
this two subdomain is placed inside the public_html
public_html
-console
-panel
Then i move the public folder from laravel original into console folder (subdomain) with all the content from public folder (index.php, .htaccess, etc.)
Console.myDomain.com is working perfectly.
Now i want to create the admin system from the panel.myDomain.com i have created the subdomain and place all assets files (css, js, etc.) and change the routes into:
Route::group(array('domain' => 'panel.myDomain.com'), function(){
Route::get('/', function()
{
return View::make('admin.index');
});
});
but the page only showing blank page, (the blank page is shown because i place index.php file without content inside the panel folder)
additional info i have setup the bootstrap/paths.php into 'public' => __DIR__.'/../../public_html/console'
and is it require to change?
what proper way to make the panel.myDomain.com execute the routes and showing the right blade i have made?
thank you.

How to create a robots.txt file to hide a view page from search engines in codeigniter

How to create a robots.txt file in a codeigniter project to hide a view page . where should i place this robots.txt file
currently i have created file like this
User-agent: *
Disallow: /application/views/myviewpage.php
in side
/public_html/folder/robots.txt (Where i place my .htaccess file). Is there any way to test this?
The robots.txt file MUST be placed in the document root of the host. It won’t work in other locations.
If your host is example.com, it needs to be accessible at http://example.com/robots.txt.
If your host is www.example.com, it needs to be accessible at http://www.example.com/robots.txt.

SEO URL redirect: www - http://www - etc

I am creating a CodeIgniter site. I have an SEO problem to address. The following URLs all point to the same page, although search engines see them all as different urls:
www.yahoo.com
http://www.yahoo.com
http://www.yahoo.com/
Does CodeIgniter have a function that can automatically redirect pages to a single URL?
if not, has anyone written a function that can create a unifying URL for the redirect?
Currently I am redirecting all pages to:
"http://-----.com/" . uri_string();
Use canonical URLs. Basically you tell the search engines that when they pull up that page by any of those URLs that the one you specify as the canonical URL is the one to be considered the "main" URL and shown in their index. The others are then not considered duplicates.
<link rel="canonical" href="http://www.yahoo.com/" />

Resources