I currently have a smartphone site and a PC site
I decided to make it responsive.
The URL is as follows.
・ PC Domain.com/index.html
・ SP domain.com/sp/index.html
Because other lower-layer pages have the same file name for PC and smartphone,
I just lost "sp", but
I asked a question here.
I'd be happy if you could teach me.
Answer # 1
In root folder's .htaccess
RewriteEngine on RewriteBase / RewriteRule ^ sp /(.*)$/$1 [R = 301, L]
※ Corrected by otn.
- redirect from https: // to http: // via htaccess
- i want to redirect all pages in a page to the top of each page of pc/sp with htaccess
- apache - redirect processing by [htaccess] (from main domain to sub domain)
- wordpress htaccess redirect setting does not work
- htaccess - about redirect
- ssl redirect setting of wordpress htaccess does not work
- apache - i can't redirect htaccess
- [htaccess] about redirect settings from url with parameters to url with parameters
- htaccess - redirect to pc page when sp page is accessed
- htaccess - redirect site redirect settings are not working properly
- how to write htaccess redirect
- htaccess redirect doesn't work
- html - how to redirect with htaccess after measuring with google tag manager or google analytics
- apache - what is 301 redirect and how to describe htaccess
- html - how to describe 301 redirect in htaccess
- apache - i wrote https redirect in htaccess but it was not redirected on a specific page
- please tell me about redirect processing using htaccess
- htaccess - 301 redirect from dynamic page (n) to static page (1)
- htaccess - the redirect process with htacess does not work
- images are not displayed when sorting between smartphone and pc with htaccess
- html - an extra path will be added to the redirect url
- how can i write without creating a loop in htaccess?
- php - about deletion of original article after 301 redirect in htaccess
- htaccess - [301 redirect] i want to exclude the character string at the end of the url
- i want to redirect using a regular expression in htaccess
- apache - cannot redirect partially with htaccess
- please tell us how to redirect htaccess when you change from https to http along with the domain transfer and also change the ur
- please tell me how to write htaccess to redirect the whole site after redirecting it