I want to redirect my users to my mobile site. My mobile site is in a subfolder instead of a subdomain. Here is how I want it to work ... Request sent to: https://www.picturepunches.com/hot Redirect to: https://www.picturepunches.com/mobile/hot I also don't want to effect the images on that page. So I want the images to be: https://www.picturepunches.com/pictures/user/1937/19974-Theosawmon.jpg And not: https://www.picturepunches.com/mobile/pictures/user/1937/19974-Theosawmon.jpg How can I do dis?

Member Avatar
Member Avatar
+0 forum 12

hi, I am created 3 tables for 1> category 2> subcategory 3> projectdetail In my website folder structure root-index.php, header.php footer.php folder- about -index.php and other files folder - project- index.php folder - err- 404.php In my php page project/index.php i make left column dynamic, i.e call value from table e.g School project ( this is category) and href link is project/School project xyz (subcategory) and href link is project/xyz abc and href link is project/abc College project www yyy I want do like when click on link project/School project It should display that project but id gives me error …

Member Avatar
Member Avatar
+0 forum 22

I'm using the following to redirect http to https in my root directory htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> But this seems not to work if I access directly sub directories (http://example.com/sub-directory/) unless I place this mod_rewrite in an htaccess file in all my sub drectories. Anyone knows a better way to do this? Just in my root htaccess file?

Member Avatar
Member Avatar
+0 forum 3

Hello, I am having a problem with .htaccess file here. I am having a program written with laravel and whatever /... I write change into localhost/dashboard. Someone mention I need to change the .htaccess file but I do not know how to. If anyone here can help me please do so. Here is my .htaccess <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule …

Member Avatar
Member Avatar
+0 forum 3

Please see here https://processwire.com/talk/topic/15108-pw-in-subdirectory/ where I've been updating on this.

Member Avatar
Member Avatar
+0 forum 2

I already tried couple solution from Google, but some of them didn't work (at all), others resulted in weird bug, where HTML page was loaded, but assets (CSS and images) didn't. Other times there were too many redirects and page freaked out. I have account on Cloud Flare, but both HTTP and HTTPS sites are accessible and changing setting that should redirect users to HTTPS, doesn't work. So my question is how can I use .htaccess to redirect from (example) `http://www.daniweb.com` and `http://daniweb.com` to `https://www.daniweb.com` To sum it up, if not HTTP, move to HTTPS, and to subdomain `www`. "If …

Member Avatar
Member Avatar
+0 forum 5

I want to redirect every user on my site to folder - if folder exists with htaccess. Regardless to which page he wants to access (index.php, team.php, custom.php), he must be redirected to the folder I want.

Member Avatar
Member Avatar
+0 forum 3

I have a admin folder where various .html files are there what happening is when i type http://mydomain.com/index.html it opens up a page and various other page but i want to put restrictions that if user is logined then only he can open other pages otherwise not. What i know is this can done using session variable like putting is_login=true in session redirecting page according to that,but my all pages are .html not .php and is there any other way of doing??

Member Avatar
Member Avatar
+0 forum 2

http://www.xyz.com/detail.php?course=InDesign_CC i want url http://www.xyz.com/detail/InDesign_CC using htaccess ......help me i try a lot but not get success.

Member Avatar
Member Avatar
+0 forum 1

Hi guys & dolls, I'm working on a website locally with MAMP and the directory tree is the same then that of the dev directory on my web server. `projects --> ecwc --> concept` But I've set the 'projects' directory on my webserver as a subdomain and this screws up my links. Locally I have to create links like this: `/projects/ecwc/concept/about/organisation.php` and for on my webserver they have to be like this: `/ecwc/concept/about/organisation.php` Is it possible to set the 'concept' directory as a root directory with htaccess (htaccess file is in 'concept' directory) so that I can just create links …

Member Avatar
Member Avatar
+0 forum 3

I am helping a friend switch from Godaddy quick shopping cart to magento. Unfortunately the Godaddy cart automatically creates product and catalog URLS. Using caps, dashes and underscores. I can dupe the link text but magento only allows dashes and no caps, I'd rather not use caps or underscores anyway. So from what I understand I can fix this issue with htaccess 301 rewrites? Can anyone please provide examples on how to handle either or both issues, with either a link to an explanation of how this works or if you can explain it yourself that's great. I'm hoping there …

Member Avatar
+0 forum 0

Hi there, I have strange situation. In google's serp i found indexed url's like this: **site.org/index.php/2015-06-27-18-17-32/2014-05-03-23-24-55/76-m40?page=3** how to remove this **/2015-06-27-18-17-32/2014-05-03-23-24-55/76-m40?page=3** if not exists ? Maybe with htaccess, but how ? I want to redirect to index.php all url's when directory not exists. I found some rules but not working for this situation.

Member Avatar
+0 forum 0

Hi, I have the following entry in my Awstats file: Unknown robot (identified by 'bot*') How can I block this bot? I tried the following separately but none of them seems to be catching it: RewriteCond %{HTTP_USER_AGENT} ^bot* RewriteCond %{HTTP_USER_AGENT} bot\* RewriteCond %{HTTP_USER_AGENT} bot[*] Thanks for any ideas.

Member Avatar
Member Avatar
+0 forum 1

Hello!I have an problem may be someone can help me about it,I put in folder swf-s and i am protecting them with htaccess. I give access some websites,my problem is to block some urls who are geting iframe embed from website have access.Is possible to block swf players dont appeard in their iframe website?Thank you in advance

Member Avatar
Member Avatar
+0 forum 3

Hi I am trying to redirect a url in the htaccess file. RewriteEngineOn RewriteRule ^wakins.co.uk$ http://www.watkins.co.uk [R=301,L] and I have also tried this RewriteEngineOn RewriteRule ^/wakins.co.uk$ http://www.watkins.co.uk [R=301,L] Thanks in advance D

Member Avatar
Member Avatar
+0 forum 1

Hi, How to make visible directory using htaccess? am using this in my htaccess. am getting below error. Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a server error, please contact the webmaster. Error 500 localhost Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6 My htaccess file: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-s RewriteRule ^(.*)$ api.php?rquest=$1 [QSA,NC,L] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.*)$ api.php [QSA,NC,L] RewriteCond %{REQUEST_FILENAME} -s RewriteRule ^(.*)$ api.php [QSA,NC,L] RewriteRule ^uploads/?$ - …

Member Avatar
Member Avatar
+0 forum 5

Hi I have a twiiter user linking to a specific page on my website which I would like to redirect to my home page. From the internet I have found and adapted the following code RewriteCond %{HTTP_REFERER} (twitter.com) [NC] RewriteRule myloginpage.php http://mywebsite.org/index.html [R,L,NC] Unfortunately this doesn't do anything. Can anyone tell me if there is an error in the code please? Thank you

Member Avatar
Member Avatar
+0 forum 6

Hi folks, I have a situation that's most easily explained via example, I think. So here goes. Let's say I have the following URLs: 1. /page.asp?id=123 2. /page.asp?id=123&category=ABC 3. /page.asp?id=123&category=ABC&var3=X&var4=Y I need these pages redirected. Currently links 1, and 2 redirect correctly. Option 3 though can have an arbitrary number of other parameters with arbitrary values. What I need to do is, for page.asp, ignore all parameters aside from id and category. Is there a way to do this with rewrite rules? If not, would it be possible to do if I did have the names of the other parameters? …

Member Avatar
Member Avatar
+0 forum 5

Hi guys, I have this weird .htaccess rule that is used for a dropdown search engine RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+) index.php?bla1=$1&bla2=$2... and so on [L] If I want to maintain the above rule, it is allright. The problem is that I want to creat a new rule with 3 variables, but the above rule is overwriting everything and it does not let me, what should I do? If I rewrite the above rule, I will loose some important SEO ranking points. Thanks in advance, Szabi Zsoldos

Member Avatar
Member Avatar
+0 forum 2

I have just installed xampp on a windows 7 os and downloaded my working web application into C:/xampp/htdocs/myweb calling the website with localhost/myweb brings up the home page try calling a specific page like localhost/myweb/about.html is redirected to localhost/xampp/ calling a specific page with localhost/myweb/index.php?include=about shows the correct page I am suspecting the problem in the setup of apaches mode rewrite or virtual host. Apache configuration in the above respect: #LoadModule reqtimeout_module modules/mod_reqtimeout.so LoadModule rewrite_module modules/mod_rewrite.so #LoadModule sed_module modules/mod_sed.so # Virtual hosts Include conf/extra/httpd-vhosts.conf <VirtualHost *:80> DocumentRoot "C:\xampp\htdocs" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "C:\xampp\htdocs\myweb" ServerName myweb </VirtualHost> Adding <Directory …

Member Avatar
Member Avatar
+0 forum 5

I have a WordPress multisite using subdomains. I have created a new website, not using wordpress, which is on the root in a folder called 'home' I am trying to remove the 'home' from the url so that it appears that this folder is the root eg. mydomain.com instead of mydomain.com/home/ I have added the following code into my .htaccess file: RewriteCond $1 !^home RewriteRule ^(.*) /home/$1 [L] This removes 'home' from the url as desired. Unfortunately it stops all of the subdomains working in wordpress, so it's bypassing wordpress completely, I still need the rest of the subdomains to …

Member Avatar
Member Avatar
+0 forum 2

How to change the htaccess redirection?

Member Avatar
Member Avatar
+0 forum 4

hello guys, its been a while since I used htaccess file, but I know how to use it. but the only problem I face is when using in this way I have page for view video watch.php?v=qvLqn2NEsOE&title=Networkplus_tutorials.html first I've create rewrite rule in .htaccess file `RewriteRule ^v-(.*)-(.*).html$ watch.php?v=$1&title=$2` so if the url is `v-qvLqn2NEsOE-Networkplus_tutorials.html` it will work perfectly. but when I change it to `RewriteRule ^v/(.*)/(.*).html$ watch.php?v=$1&title=$2` the page shows but without CSS :( , what should I do before change for this rule in htaccess ? ![e38cf778282331ccce1902a1ffce4061](/attachments/large/3/e38cf778282331ccce1902a1ffce4061.jpg "e38cf778282331ccce1902a1ffce4061")

Member Avatar
Member Avatar
+0 forum 3

Hi, I am trying to write a .htaccess script that can redirect any URL on my site (whether it exists or not, including sub-domains) to the index page of that site. For example: example.com/pages/page.htm ---> example.com sub.example.com/page.htm ---> example.com error.example.com/error ---> example.com I've tried a few things with mod_rewrite but I can't seem to get existing urls, non-existing urls and sub domain urls to all direct to the index page. Thanks, Martin

Member Avatar
Member Avatar
+0 forum 5

I have a doubt with my codeigniter .htaccess file. I was hoping there was something I was missing. My question is I need a different .htaccess file for my live server and one for localhost. Locally, I'm using macos and linux, on my live server I am using centos with plesk(not sure if that matters). The issue is I need a different htaccess file for the different environments. This seems stupid! As eventually I want to release my code so the end user doesn't have to manually edit the .htaccess files to get rid off the index.php in the url! …

Member Avatar
Member Avatar
+1 forum 5

I want to do a redirection where a user enters their user name in the URL and redirects to their profile, like this: example.com/joe redirects example.com/profile.php?username=joe I want to do it like Facebook does

Member Avatar
Member Avatar
+0 forum 14

I used following code for hiding **.php** extension but **mail()** function stopped working. What is the problem? RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] RewriteRule ^ %1 [R,L,NC] RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^ %{REQUEST_URI}.php [L] **Mail function & redirect** mail($to,$subject,$message,$headers); header('Location: http://xyz.com/');

Member Avatar
Member Avatar
+0 forum 2

I am getting 500 internal server error; here is my .htaccess code AuthName "admin" AuthUserFile "/home/machiner/.htpasswds/public_html/passwd" # mod_pagespeed configuration - Do NOT modify the contents <IfModule pagespeed_module> ModPagespeedDomain * ModPagespeed on </IfModule> # End of mod_pagespeed configuration- Do NOT modify the contents

Member Avatar
Member Avatar
+0 forum 3

Is it possible to remove the suffix of URLs using the .htaccess file? For example you have [url]http://www.example.com/page.php[/url] can you change it to [url]http://www.example.com/page[/url] without the .php. I want it to work both ways, with the .php and without. Is there a way to do it with the .htaccess file? if so how? If you do it a different way how do you do it?

Member Avatar
Member Avatar
+0 forum 19

This is my index.php <?php if(!isset($_GET["page"]) || $_GET["page"] == "home"){ if(isset($_GET["txt"])){ include "search.php"; }else{ include "content.php"; } }else if($_GET["page"] == "user" && $_GET["user"]){ include "content_kategori.php"; }else if($_GET["page"] == "kategori" && $_GET["kode"]){ include "content_kategori.php"; }else if($_GET["page"] == "full" && $_GET["kode"]){ include "content_full.php"; }else{} ?> and this is my .htacces <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteRule /user/(.*)\ index.php?user=$1 </IfModule> rewrite Input URL http://localhost/teuing/user/index.php?user=zein Example Output http://localhost/teuing/user/zein But rewrite not work

Member Avatar
Member Avatar
+0 forum 2

The End.