.htaccess

i want to make a htaccess to have a short link

对着背影说爱祢 提交于 2020-01-05 22:28:50
问题 just wish to present this long link login.mydomain.com/myusersaccount/loginaccount/login.php, to this login.mydomain.com, so that when i access login.mydomain.com/myusersaccount/loginaccount/login.php, it take me to this login.mydomain.com, here is the code i use in htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC] RewriteRule ^ %{HTTP_HOST}%{REQUEST_URI} [NE,R=301,L] RewriteCond %{HTTP_HOST} ^login\.mydomain\.com$ [NC] RewriteRule ^$ http://login.mydomain.com

.htaccess Rewrite url with images from a folder to a php file

荒凉一梦 提交于 2020-01-05 21:27:21
问题 I want to rewrite all the images in my wp-content/uploads folder to a thumbs.php file in wp-content/thumb folder without changing url This is what I have added in my .htacccess # BEGIN img <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{HTTP_USER_AGENT} !someweirdcrawler RewriteRule ^(wp-content/uploads/.+?)\.(jpe?g|png|gif|svg)$ /wp-content/thumbs/index.php?img_source=http://mywebsite.com/$1.$2 [L] <

.htaccess Rewrite url with images from a folder to a php file

断了今生、忘了曾经 提交于 2020-01-05 21:27:09
问题 I want to rewrite all the images in my wp-content/uploads folder to a thumbs.php file in wp-content/thumb folder without changing url This is what I have added in my .htacccess # BEGIN img <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{HTTP_USER_AGENT} !someweirdcrawler RewriteRule ^(wp-content/uploads/.+?)\.(jpe?g|png|gif|svg)$ /wp-content/thumbs/index.php?img_source=http://mywebsite.com/$1.$2 [L] <

Time lock for mod_rewrite in .htaccess file

喜夏-厌秋 提交于 2020-01-05 21:20:33
问题 I have question: RewriteCond %{HTTP_USER_AGENT} (safari|navigator) [NC] RewriteCond IF SOMEONE ASK, IN LESS THAN 30 SECONDS (HALF MINUTE) FOR FILES IN FOLDERS (folder1|folder2|folder3) RewriteRule ^((?!folder3/).*)$ /folder3/$1 [L,NC] Perhaps more simplified: RewriteCond IF SOMEONE ASK, IN LESS THAN 30 SECONDS (HALF MINUTE) FOR FILES IN FOLDERS (folder1|folder2|folder3) RewriteRule ^((?!folder3/).*)$ /folder3/$1 [L,NC] If someone ask (some browser) apache http server for files in folder1 and

CakePHP shows 500 Internal Server Error

强颜欢笑 提交于 2020-01-05 17:36:09
问题 I'm having a problem with my CakePHP installation. I was developing it in a subfolder and it was working fine. But, when I move it into the root folder, it's showing 500 Internal Server Error. For example, it was working fine on: mysite.com/demo/ But, when I move it into the same server root, i.e. mysite.com/ it's showing the error. CakePHP Version: 2.2 As it was working fine on /demo/ folder, I think the mod_rewrite etc. are working fine, so that confused what's happening with the root

htaccess URL redirect to beta subfolder, while using friendly URL rewrite

荒凉一梦 提交于 2020-01-05 15:17:26
问题 Hi I have the following redirection for a friendly URL site <IfModule mod_rewrite.c> Options +FollowSymLinks -Multiviews RewriteEngine on RewriteBase / RewriteRule ^$ /beta/ [L] // Got this from a fellow user in SO but didn't worked RewriteRule ^home index.php RewriteRule ^noticia/([\w-]+)/?$ noticia.php?title=$1 [L,QSA,NC] RewriteRule ^busqueda/([\w-]+)/?$ busqueda.php?item=$1 [L,QSA,NC] RewriteRule ^producto/([\w-]+)/?$ producto.php?item=$1 [L,QSA,NC] RewriteRule ^noticias/page/([\w-]+)/?$

Local site redirecting to live site

☆樱花仙子☆ 提交于 2020-01-05 12:56:34
问题 I'm trying to set up my web files locally for testing. I have my site files in my documents folder. I have xampp installed and have set up apache to use baseball.dev to bring up my local website. But when I try to use it, baseball.dev redirects to the live site. I'm not sure why. My httpd-vhosts file: <VirtualHost *:80> DocumentRoot "C:/Users/Kirst/Documents/GitHub/baseball-for-busy- people/" ServerName baseball.dev ServerAlias www.baseball.dev <Directory "C:/Users/Kirst/Documents/GitHub

How to redirect /directory/index.html and /directory/index.php to /directory/

陌路散爱 提交于 2020-01-05 12:49:34
问题 I have to do some redirects - index.html and index.php to /. I could redirect www.domain.com/index.html and www.domain.com/index.php to www.domain.com with this line: RewriteRule ^index\.(php|html?)$ http://www.mydomain.com/ [R=301,L] However I still have problems with pages like these: www.domain.com/directory/index.html - returns 200 OK www.domain.com/directory/index.php - returns 300 multiple choices (don't know why) Is it possible to redirect them to www.domain.com/directory/ and do it

How to redirect /directory/index.html and /directory/index.php to /directory/

五迷三道 提交于 2020-01-05 12:49:07
问题 I have to do some redirects - index.html and index.php to /. I could redirect www.domain.com/index.html and www.domain.com/index.php to www.domain.com with this line: RewriteRule ^index\.(php|html?)$ http://www.mydomain.com/ [R=301,L] However I still have problems with pages like these: www.domain.com/directory/index.html - returns 200 OK www.domain.com/directory/index.php - returns 300 multiple choices (don't know why) Is it possible to redirect them to www.domain.com/directory/ and do it

HTAccess rewrite dynamic page url

半城伤御伤魂 提交于 2020-01-05 12:12:49
问题 thanks for your help in advance Basically i have made a dynamic url website http://planet-dj-surrey.com/ I cant seem to figure out the code for the htaccess file to redirect a dynamic page and make it cleaner. for example i want http://planet-dj-surrey.com/index.php?page=designprocess to be changed to http://planet-dj-surrey.com/designprocess/ currently i have this but it does not seem to be working, RewriteEngine On RewriteRule ^/dropdownchoice/$ index.php?page=dropdownchoice [NC] Thanks in