mod-rewrite

Change URL in browser without redirection with htaccess

此生再无相见时 提交于 2019-12-13 17:07:07
问题 I've looked everywhere to find the proper solution/method but I can't seem to find anything that works for me. I even asked friends and they helped but none prevailed. What i'm trying to do is, changing the URL displayed in the browser but only that. (No rediraction, page re-loading). I want to do this to make my UCP just cleaner looking when going through certain pages/files. What am I trying to achieve? Heres an example on a profile, the URL would be: mysite.com/ucp/profile.php?player

mod_rewrite not passing querystring

ぐ巨炮叔叔 提交于 2019-12-13 16:58:11
问题 I have an apache2 server installed with PHP CGI to run php scripts inside one of my directories I have .htaccess file with the following: RewriteEngine On RewriteRule ^article\/(\d+)\/?$ article.php?id=$1 [NC,QSA] when entering URI such as http://www.mysite.com/article/132/ the rewrite makes the redirect but inside article.php I can't read $_GET["id"] ( var_dump from $_GET / $_REQUEST results in empty array in another server I have which has apache with mod_php - everything works fine. I'm

URL Rewrite - remove directory name in the URL - PHP

て烟熏妆下的殇ゞ 提交于 2019-12-13 16:57:28
问题 I want to rewrite the url like this: http://localhost/public/viewbusiness.php?s=cyberbooger-web-services into http://localhost/viewbusiness.php?s=cyberbooger-web-services thus removing the directory name in the url. You noticed that the viewBusiness.php is located in the public directory. My application is not following the MVC architecture, and not using a framework. This is a application I am doing right as I currently studying PHP. My folder structure is like this: -- /app -- /public --

Apache rewrite to preserve query string

笑着哭i 提交于 2019-12-13 16:50:25
问题 I have a set of rules that rewrite URL depending on the affiliate. Everything works fine However, I'm having a problem preserving the complete query string in URL. Here's my rewrite rule RewriteRule ^/(.*\.html) /adb.pl?code=${affcode:$1}&extra=%{QUERY_STRING} [PT,L] The query in URL gets stripped after affcode. URL should look like this: http://mydomain.com?utm_campaign=TEST-AFF&utm_source=TEST-AFF&utm_medium=TEST-AFF&utm_term=TEST-AFF&utm_content=TEST-AFF-JON Instead I'm getting this in my

RewriteCond and rewriteRule to redirect depending on the domain

寵の児 提交于 2019-12-13 16:38:21
问题 First of all, I've got a few domains pointing to the same webpage, each domain corresponfing to a different language. The webpage (Drupal) identifies the language using a /lang parameter in the url ( example.com/en ). I need to redirect every domain to its corresponding language so I need something like: example.com -> example.com/en example.ru -> example.ru/ru example.fr -> example.fr/fr I defined some rules in htaccess but they don't do what i expected: # Rewrite --- http://www.example.com

.htaccess to Create Search Engine-Friendly URLs

时光怂恿深爱的人放手 提交于 2019-12-13 16:37:41
问题 I am looking for a way to get rid off the .php extension from my file i have just got a static website with index.php and map.php I have tried lots of different tutorials but none work i just want the following. http://example.co.uk/map.php becomes http://example.co.uk/map/ and http://example.co.uk/index.php becomes http://example.co.uk/ Can you do this with a static file i have tried so many different options and none have worked for me. i have tried this. Options +FollowSymLinks

mod rewrite subdomain to folder break paths to css and images

扶醉桌前 提交于 2019-12-13 16:25:15
问题 I'm trying to use mod rewrite to redirect a subdomain to a file with a parameter in a folder. The website is in a folder /new in the root. My .htaccess right now is (placed in the root) RewriteEngine on RewriteCond %{HTTP_HOST} ^[www\.]*new.mydomain.com [NC] RewriteCond %{REQUEST_URI} !^/new/.* RewriteRule ^(.*) /new/index.php?cust_id=1807 This is working, it redirects the browser to the right file with the parameter but it breaks all css, js and image links. I know using absolute paths or

Server 500 error - moved app in subfolder

浪子不回头ぞ 提交于 2019-12-13 16:22:28
问题 I developed an application in a subfolder of my website and it worked fine. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(index\.php|images|swf|uploads|js|css|robots\.txt) RewriteRule ^(.*)$ /app/index.php/$1 [L] </IfModule> This file was working fine so and index.php was not required to navigate within the application. Now I moved the application to root of website and changes the last line to RewriteRule ^

AH00124: Request exceeded the limit of 10 internal redirects due to probable

偶尔善良 提交于 2019-12-13 16:07:36
问题 After the upgrade of my Ubuntu server, I tried open my wordpress website and I got this error in my error.log AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. message a get when i open the website. <?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to

RewriteMap activation

孤街醉人 提交于 2019-12-13 16:00:23
问题 How to activate RewriteMap in apache ? I tried to run rewritemap in httpd config when I restart apache, it says that "RewriteMap not allowed here" i tried to google and go to apache but couldn't find a way to activate it. anyone know? thanks. :) 回答1: The Context information tell you where you can use a directive. For RewriteMap it says server config or virtual host . 来源: https://stackoverflow.com/questions/703709/rewritemap-activation