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?
Related
Trying to rewrite a base url e.g http://beta.mydomain.com to http://beta.mydomain.com/cms/index.cfm/new-home but want browser to show base url not the cms url.
Im trying this in isapi httpd config file:
RewriteRule ^$ /cms/index.cfm/new-home [NC,L]
but it simply redirects to http://beta.mydomain.com/cms/index.cfm/new-home
which is correct except that the browser must show http://beta.mydomain.com/ not the cms part.
We are using IIS 6 with isapi module installed. Thats the only thing I know about the server (but I have access to server). Is that possible? If not then what other options do I have?
I have an idea: Load http://beta.mydomain.com/cms/index.cfm/new-home in an iFrame.
For example if someone browser to base URL i.e. http://beta.mydomain.com/ then load http://beta.mydomain.com/cms/index.cfm/new-home page in iframe.
It should be like a condition at top of your index page.
if (only baseURL) {
iFrame: Load http://beta.mydomain.com/cms/index.cfm/new-home
}
Hope this help :)
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
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.
I am trying to run Shell In a Box (link) through another server (the computer running shellinabox is not accessible from the internet) . Ideally I could use ProxyPass in the Apache config to have a reverse proxy. Problem is I can't access the conf file. So I tried using .htaccess and I discover that I cannot use ProxyPass in there. So I tried and used mod_rewrite to do the job. Currently I have the following on the .htaccess file
RewriteEngine On
RewriteRule ^$ http://10.1.13.236:4200/ [P]
However while it displays the title correctly and if I open up the source code I can see there is something in the page, nothing is diplayed on the screen (it remains blank). My suspicion is that there are problems with AJAX and this kind of proxy.
What I am trying to accomplish with the mod_rewrite as close as possible behaviour to ProxyPass (Mirorr a website in a subdirectory).
Is this possible? Is there some other solution (I tried phproxy and khproxy but neither of them is able to display anything)?
I'm a complete newbie to htaccess and I'm having a problem getting the mod_rewrite to work.
I'm trying to change the below:
http://localhost/login/sitepage.php?linklabel=editted
to
http://localhost/login/sitepage/editted
I've looked at loads of solutions online and none of them work. I've used phpinfo() and mod_rewrite is loaded and I've been able to direct the users to a 404.php file with the htaccess file.
any help would be great thanks**
hey guys sorry for the bother there wasn't actually a problem it was just me being really dumb. I misunderstood what mod_rewrite actually did in that i thought it rewrote the url in the bar when you clicked on a link that displays the query in the url bar.
For anyone who has came across the same problem here's the problem and solution:
i wanted this /sitepage.php?linklabel=editted to change to /editted.html
anyway using the code generator at http://www.generateit.net/mod-rewrite/ , in the .htaccess file i put the follwing code -
RewriteEngine On
RewriteRule ^([^/]*).html$ /sitepage.php?linklabel=$1 [L]
When i clicked the button it still went to /sitepage.php?linklabel=editted
I forgot to change editted page
to
editted page because it displays the content from the /sitepage.php?linklabel=editted page in the new url.