Tag Info

Hot answers tagged

3

Hey guys I finally figured it out, some how the code that works to do this in Modx CMS is below! This code shows you how to install it in a folder on your server. It tells the htaccess file to read the .html extension and loads up the page without a problem. #works, so happy!! # MODX supports Friendly URLs via this .htaccess file. You must serve web # ...


2

# Make sure RewriteBase points to the directory where you installed MODX. # E.g., "/modx" if your installation is in a "modx" subdirectory. RewriteBase / As stated in the comments at the top of the file, RewriteBase should be set to your subdirectory: RewriteBase /makeabio This affects the relative path substitution later in the file (half way down): ...


2

You must have more directives in your .htaccess in order to do the complete HTTP and HTTPS redirection. So, filling in the gaps... For the sake of simplicity I've assumed you don't have any other subdomains (apart from www). So you are redirecting everything at example.com to www.sample.com. # Redirect http://example to http://sample RewriteCond %{HTTPS} ...


2

For future readers, there are several builds of Apache one for each of the major *inux instances out there and there are differences between them. One of the major differences is whether Apache is using httpd.conf where it is primarily configured as a single site web server or using apache2.conf where it is primarily configured for virtual hosts. Personally, ...


1

Check .htaccess files to see if theres anything in it causing a 403. Also ask the server admin to check httpd.conf (apache's configuration file) to see if that has anything referencing error 403. And finally, a special module might be installed that blocks out certain URLs. And the file extension should be anything but .html if you're adding on query ...


1

Try adding this code to your wp-config.php file: define( 'WP_SITEURL', 'http://example.com' ); define( 'WP_HOME', 'http://example.com' ); It will override any values in database. Also, check if siteurl and home keys in wp_options table are correctly set.


1

Check the actual file you're running the query strings against to see if it is producing the 403 errors. If you create a PHP file that has the following contents and save it and then run it live on the server while using an actual dot in the query string, then you'll get the 403 error. <?php if (strpos($_SERVER['QUERY_STRING'],".") !== false){ ...


1

Your best bet is to create an index.php and place it in your web root folder (normally named public_html) that is connected with the website http://baseball.sports.com. That index.php file must contain a script to load contents from the other website you're trying to link to. This PHP code might work well for you: <?php echo ...


1

Using your example, you can use an out in your code. RewriteEngine On # Go to https if not on room.html RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} !^/room.html$ [NC] RewriteRule ^(.*)$ https://www.mycookiedomain.com/$1 [R,L] # Go to http if you are on room.html RewriteCond %{SERVER_PORT} !80 RewriteCond %{REQUEST_URI} ^/room.html$ [NC] ...


1

?utm_source=dlvr.it&utm_medium=twitter utm_source and utm_medium are used by Google Analytics (and possibly other trackers) to monitor campaigns, so blocking access purely on this query string does not "feel right", however, if this is correct in your situation then ok... An important point to realise with query strings is that they cannot be ...


1

If you have the mod_rewrite module installed, then you can put this in your .htaccess file in the root folder of your website (which usually is the public_html folder): RewriteEngine On RewriteRule ^\?utm_source\=dlvr.it\&utm_medium\=twitter$ - [R=403,NC,L] You might have to remove the \ from the =, I can't remember if equals needs escaping. Another ...


1

You could do this in your .htaccess file: RewriteEngine on # if https and starts with www, go to http version RewriteCond %{SERVER_PORT} ^80$ RewriteCond %{HTTP_HOST} ^www [NC] RewriteRule ^(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [L,R=301] # if not https and it doesnt start with www, go to https version RewriteCond %{SERVER_PORT} !^80$ RewriteCond ...



Only top voted, non community-wiki answers of a minimum length are eligible