Laravel 5 how to set hosted website on development mode - laravel-5

How do I set my hosted Laravel site such that an attempt to visit any page of the website should display a message like: "Sorry, Website is under development, Will be available soon". it may be a dumb question but am new to this.
thanks for any help.

you need to modify
yourLaravelDirectory/public/.htaccess
and add this rule to it
RewriteEngine on
RewriteRule ^(.*)$ http://www.newdomain.com [R=permanent,L]
so now onwords all your traffic will redirect to this new domain..
make sure you have one html page that says "Sorry, Website is under development, Will be available soon" hosted at www.newdomain.com

Related

How to do 301 redirect in herokuapp free hosting?

I am trying to do 301 redirect in my herokuapp. How can I do it. I have used <link rel="canonical" href="http://mysite.herokuapp.com">. And I have also used this tag for every page with the url of the page. Still I failed to fix 301 redirections problem in my heroku website.
With url http://mysite.herokuapp.com website is working but with url
www.http://mysite.herokuapp.com it shows
This site can’t be reached
Yoast seo shows this message
"Warning, no 301 redirects are in place to redirect traffic to your
preferred domain. Pages that load successfully both with and without
www. are treated as duplicate content! "
For this problem my website is not indexing in google, I think. How can i show my website in google search.
Note: I have submitted my website to google search console and verified it.
Please help me to solve this problem.
You will want to use something called htaccess
There should be a file in the root of your web directory called ".htaccess" If not create one.
You want a rule something like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.mysite.herokuapp.com [NC]
RewriteRule ^(.*)$ http://mysite.herokuapp.com/$1 [L,R=301]
This should redirect www traffic to a none www prefix

how to redirect a link in my website to an external link?

I have provided a link from my web site in my andoird app which is:
www.mysite.com/support
And i want this link to be redirected to:
www.anothersite.com
i have already tried com_redirect and entered support as source and http://ww.anothersite.com but i dont get any redirects and i get 404 error.
I am running Joomla 3.x and i want to know how i can do this with URL rewrites and no external components.
It seems not possible to do it within the Joomla backend (i tried many combination of menu items and the redirect module).
For sure you can write your redirect directly in your .htaccess (if you are using it) like this:
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^support/?$ http://www.anothersite.com/ [R=301,NC,L] # Permanent Move
or
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^support/?$ http://www.anothersite.com [R,NC,L] # Temporary Move
More info about URL rewriting and .htaccess are here: http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

RewriteRule causing redirection

I have IIS 7.5 with ISAPI_Rewrite(Helicon)
I'm trying to do so that the robots.txt from each hosted site will be the same.
For that purpose I have one dummy site(sometestsite.com) which has robots1.txt(which I want to be reused on each other site)
And I have following RewriteRule:
RewriteRule ^(.*)/robots.txt$ http://sometestsite.com/robots1.txt
When I am requesting http://sometestsite.com/robots.txt it displays contents of http://sometestsite.com/robots1.txt as expected, but when I am requesting http://completelydifferentsite.com/robots.txt it redirects me to http://sometestsite.com/robots1.txt.
What I am doing wrong? Also if here is another approach to achieve my goal I will be very thankful to hear one.

present a static page url as different url which is SEO friendly

I have developed a site, which has some static pages. Like explore, home, feedback.
The link for these goes as follows
website.com/views/explore.php
website.com/index.php
website.com/views/feedback.php
I want to write a different SEO URL for each of the URL mentioned above.
Is it possible ?
i.e. for example
website.com/views/explore.php should be convereted/visible as website.com/explore
website.com/views/feedback.php should be convereted/visible as website.com/give/feedback
and so on
You can use these mod_rewrite rules to rewrite requests to /explore and /give/feedback internally to /views/explore.php and /views/feedback.php:
RewriteEngine on
RewriteRule ^explore$ views/explore.php [L]
RewriteRule ^give/feedback$ views/feedback.php [L]
with .htaccess file you can change any url on your site. i love this file.
if you are hosting website in ISS the you can try IIS SEO toolkit. & set dynamic URL itself in IIS
see the indepth explaination by Scott about Imporve SEO by SEO Toolkit

website using url-rewriting does not load in Chrome!

I have a PHP page called contact.php, and a rewrite rule in .htaccess
RewriteRule ^(.*).html $1\.php [L] that gives contact.php when asked for contact.html.
All the pages works (on Firefox and IE), but when I enter on the site with Chrome it loads only the index page and the others don't work at all - I receive a 404 error.
I don't think is a server issue (I'm using Ubuntu server 8.04) I think is a browser issue but still unexplainable...
Has sombody a clue to follow?

Resources