New answers tagged

2

So, is a redirect to another page with 410 code fine? A redirect is not necessary. Define a custom 410 error document: ErrorDocument 410 /error-docs/e410.php And trigger the 410 in .htaccess, as you did before: RewriteRule ^deleted/ - [G] The G flag is simply a shortcut for R=410 and the L flag is not required (it is implied when using a status code ...


1

I expect www.filmstore.sandwiches.org to go to sandwiches.org, ... This does not work, but sends me to filmstore.net, which I think is the default behaviour for multiple cPanel domains. Ah, but the "problem" here is that the www.filmstore subdomain maps to the /filmstore subdirectory off the main domains document root (as stated in comments) - this ...


1

RewriteCond %{REQUEST_FILENAME} !^/PhP/?$ RewriteCond %{REQUEST_FILENAME} !^/forms/?$ RewriteCond %{REQUEST_URI} !^/PhP/?$ RewriteCond %{REQUEST_URI} !^/forms/?$ You don't need to check against both REQUEST_FILENAME and REQUEST_URI - you're just repeating the same check. It's easier to use REQUEST_URI (the URL-path) in this instance. The ...


1

It sounds like you may have put the directives in the wrong place in your .htaccess file. The HTTP to HTTPS redirect needs to go near the top, before any other rewrites. The nature of your URLs suggest you are using a front-controller type pattern and rewriting requests to a common script. However, the "homepage" does not need to be rewritten (since mod_dir ...


2

What you are seeing is default behaviour on Apache. when I enter random subdirectories, such as /index.php/asdfghjk /asdfghjk is an additional path-segment in the URL. It's not strictly a "subdirectory". (Directories and subdirectories relate to a filesystem. The URL does not necessarily map directly to the filesystem.) When additional path segments ...


0

As the content of the page is user-specific, it would likely be always blank for spiders (which probably won't trigger the conditions required to have anything other than the blank version of the page). Ergo, you're probably better blocking spiders from accessing the page entirely. Just add the following to your robots.txt file. Disallow: /?read-it-later ...


1

It would seem "the problem" is in your PHP code, not .htaccess as you seem to suggest. RewriteRule ^(.+)$ index.php?page=$1 [QSA,L] All requests are rewritten to index.php (your "front-controller") which then routes your URLs. It is this PHP script that determines whether /login or /login/asdasdasd, etc. resolve to a valid page on your site. This has ...


Top 50 recent answers are included