Tag Info

New answers tagged

0

This rewrite rule will surely work. Add this code to your .htaccess file. RewriteEngine On RewriteRule ^uni/([^/]*)$ /gallery/?university=$1 [L]


2

You might have edited your .htaccess file in Windows notepad or text editor. If you did use Windows text editor then it must have added some special chars in .htaccess file and that will lead to 500 internal server error. Never edit in Windows text editor. Use notepad++ for editing .htaccess and .htpasswd files.


0

Ok. Then you can use template_redirect hook and wp_is_mobile() conditional tag. wp_is_mobile() will work on device only. If you resize the window then it will not work. Now you can try this kind of code in your functions.php file add_action('template_redirect', 'redirecting_to_mobile_site'); function redirecting_to_mobile_site(){ if( wp_is_mobile() ){ ...


-1

.htaccess is not a problem for that, but be care with security. Ok, maybe it was not the best answer. But I'm searching and I found the solution here: Giving WordPress Its Own Directory 1- Check your index.php (located at 'public_html') and write on: require( dirname( __FILE__ ) . '/<your-tree-directory>/wp-blog-header.php' ); in your case: require( ...


0

Did you update the URL in the DB? It sounds like the site still thinks it's running in the old location which usually indicates the DB still has the old path in it. I highly recommend the Search and Replace tool that Interconnect IT produces. The stable 2.1 version is my preference. Make sure you remove this script when you have finished. It's an open ...


1

.htaccess is ok but I often like the convenience of using a plugin for this stuff. I like Redirection most, it also supports regular expressions. The regexp ^/page/(.*) will match stuff like page/n and it won't match category/name/page/n. You might want to learn more about regexes if needed.


0

I made modification of rules, now it is working fine. #For post page URLs RewriteRule ^(.*)-some-category-suffix(.*)-some-category-suffix(.*).jpg.html(.*)$ /category-url/$1$2$3.html [L,R=301] #For post add-on page URLs RewriteRule ^(.*)full-size/(.*)-some-category-suffix(.*)-some-category-suffix(.*).jpg-(.*)(.*).html$ /category-url/$1$2$3$4.html?-$5$6 ...


2

It looks as though what you're asking is to redirect /page/n to the homepage, this can be accomplished with the RedirectMatch directive. So: RedirectMatch 301 ^/page/(.*) http://www.my-site.com/ would redirect all traffic from /page/n to the homepage.


1

Use Database Search and Replace and replace the IP 192.168.33.21 with the domain name project.dev.


-1

this was the answer via htaccess (to be placed in htaccess within the blog.mysite.com directory). RewriteEngine On RewriteCond %{HTTP_HOST} ^(?:blog\.)site\.com$ [NC] RewriteRule ^ http://site.com%{REQUEST_URI} [L,R=301]


2

You ask: How does that work ? As far as I can read it, it only specifies not to rewrite certain urls (using -), These files are included within the WordPress PHP scripts, so there's no need to access them in the browser, but notice the rewrite flags. Here's some information on the F, L and S flags from the Apache docs: Using the [F] flag causes ...



Top 50 recent answers are included