httpd.conf

ISAPI ZEND url rewrite adding extra “/index.php/” into url

早过忘川 提交于 2020-01-15 03:53:20
问题 We recently reinstalled our web site on our server, the sys admin says it is an exact rebuild, and it indeed looks to me that it is, but there is something different going on. I did not originally develop the site, and those who did are no longer available. urls for the admin site are now //admin.site.com/index.php/schedules and used to be, and should be //admin.site.com/schedules The extra index.php is getting inserted in the url. But all links within the admin site do not include the index

Redirect to a new domain using apache vhost configuration

谁都会走 提交于 2020-01-11 13:10:09
问题 I have an apache vhost configurations as below. I want all my requests from somedomain.com/loadproduct?product=dell-inspiron-15 to be redirected to someotherdomain.com/dell-inspiron-15 . Can I do this from vhost configuration? Note that I have query parameters in the url. Listen 12567 NameVirtualHost *:12567 <VirtualHost *:12567> ServerName somedomain.com ProxyPreserveHost On RewriteEngine On RewriteRule ?? </VirtualHost> Any leads here is really appreciated. 回答1: You can use (instead of

Redirect to a new domain using apache vhost configuration

岁酱吖の 提交于 2020-01-11 13:09:32
问题 I have an apache vhost configurations as below. I want all my requests from somedomain.com/loadproduct?product=dell-inspiron-15 to be redirected to someotherdomain.com/dell-inspiron-15 . Can I do this from vhost configuration? Note that I have query parameters in the url. Listen 12567 NameVirtualHost *:12567 <VirtualHost *:12567> ServerName somedomain.com ProxyPreserveHost On RewriteEngine On RewriteRule ?? </VirtualHost> Any leads here is really appreciated. 回答1: You can use (instead of

Redirect URLS with Apache mod_rewrite

扶醉桌前 提交于 2020-01-06 19:28:16
问题 I'm trying to redirecting URLS received on my Apache web server. Basically when I type localhost/index.html I want the website to redirect me to a readme.html file inside the htdocs . index.html and readme.html files both are saved in the htdocs . I looked at the Apache documentation but I cannot seem to get this working. Below I have included the code I have wrote so far inside the httpd.conf file. DocumentRoot "usr/local/apache2/htdocs" <Directory "/htdocs"> Options FollowSymLinks

Selectively redirect to a new domain using apache vhost configuration

☆樱花仙子☆ 提交于 2020-01-06 05:22:10
问题 This is a followup question on Redirect to a new domain using apache vhost configuration I want my requests from somedomain.com/loadproduct?product=dell-inspiron-15 to be redirected to someotherdomain.com/dell-inspiron-15 but selectively for some products which are whitelisted. For example for products : dell-inspiron-15. dell-inspiron-16. dell-inspiron-17 redirect to the new URL but for any other products I want to use the current path itself. Currently my vhost configuration looks like

Conditional “OR” operation in RewriteRule

纵饮孤独 提交于 2020-01-05 05:39:50
问题 I want to redirect certain urls of my old website to the new website. This redirection to new website is conditional i.e if query param contains key "site" with value as "eu", "jp" or "in" then only redirect otherwise do not. RewriteCond %{QUERY_STRING} (?:^|&)site=(eu) [NC,OR] RewriteCond %{QUERY_STRING} (?:^|&)site=(in) [NC,OR] RewriteCond %{QUERY_STRING} (?:^|&)site=(jp) [NC] RewriteRule ^/?fetchHomePage.action$ https://example.com/%1? [R=301,L,NC] RewriteRule ^/?fetchFirstPage.action$

What is the meaning of ^ and $ in Apache HTTPD RewriteRule?

你离开我真会死。 提交于 2020-01-05 03:53:05
问题 I have successfully added the following code to my Apache HTTPD configuration: # Force www. RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] # Force https (SSL) RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Although it works as expected, I have a theoretical question: Why are there a ^ and $ in 3rd line enforcing "www.", and not in the 6th line enforcing "https"? Sincerely, Dovid. 回答1: For both of your regex

Apachectl “service already loaded” when it's not

蓝咒 提交于 2020-01-04 05:32:09
问题 I am trying to learn a bit about the terminal and servers. I am following a course and in this course it states that you can start and stop the server apache (on mac) by using the command: sudo apachectl start But, when I do this, it comes back with a message saying that apache is already functioning. The full message: /System/Library/LaunchDaemons/org.apache.httpd.plist: service already loaded Apache is clearly not running though: ps aux | grep httpd doesn't return any activity. I expect

Apache shutdown unexpectedly after documentroot change in httpd.conf

拥有回忆 提交于 2020-01-02 05:04:47
问题 I'm currently following this toturial to try to get use a folder in dropbox as my htdocs folder. When I change these lines: DocumentRoot "C:/xampp/htdocs" <Directory "C:/xampp/htdocs"> to DocumentRoot "C:/Users/Håvard/Dropbox/web" <Directory "C:/Users/Håvard/Dropbox/web"> I get the following error: 19:39:52 [Apache] Error: Apache shutdown unexpectedly. 19:39:52 [Apache] This may be due to a blocked port, missing dependencies, 19:39:52 [Apache] improper privileges, a crash, or a shutdown by

Can I block search crawlers for every site on an Apache web server?

我们两清 提交于 2019-12-31 08:30:09
问题 I have somewhat of a staging server on the public internet running copies of the production code for a few websites. I'd really not like it if the staging sites get indexed. Is there a way I can modify my httpd.conf on the staging server to block search engine crawlers? Changing the robots.txt wouldn't really work since I use scripts to copy the same code base to both servers. Also, I would rather not change the virtual host conf files either as there is a bunch of sites and I don't want to