I have website with this output Link :  https://domain1.net/estates.php?estname=XXXX&amp;location=YYYYY   I want change it to :  https://domain1.net/XXXXX/YYYYY   I try it with following rewrite rule :  RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)/([^/]*)/?$ /estates.php?estname=$1&amp;location=$2 [L]   or  RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^-]*)/([^-]*)/?$ /estates.php?estname=$1&amp;location=$2 [L]   but result not work fins , means when test it site design break down and pic and CSS element not loading .
88295
I am trying to make my url from this:  example.com/view.php?id=15   To this:  example.com/watch/15   My code in .htaccess is as follows:  Options -Indexes Options +FollowSymlinks RewriteEngine On RewriteRule ^watch/([^/]+) view.php?id=$1 [NC]   Now if I go to example.com/watch/15 it loads the content but without any JS, CSS because in this case it looks for CSS and JS under the /watch folder which doesn't exist.  How do I make this option work properly? I don't want to create watch folder and copy-paste CSS and JS so it will embed properly.
20630
Is there a mod_rewrite equivalent for IIS 7.0 that's   a) more or less complete   b) suitable for a production environment, i.e. battle-tested/dependable/secure  Do you have an experience-based recommendation?
55957
I want to extend my website in a way that is parallel to the wordpress theme.  Example:  My website with wordpress is at: www.mywebsite.com By ftp I added a directory named test, in which there is a php file test.php  The problem is that if I write in the url: www.mywebsite.com/test/test.php it redirects me to the "page not found" of my theme.  How can I deactivate this behavior?   Posting .htaccess:  # BEGIN WordPress &lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] &lt;/IfModule&gt;  # END WordPress  # # av:php5-engine AddHandler av-php5 .php  # # av:Toolbar SetEnv AV_TOOLBAR 1
21711
After having read various articles on this site about WWW or Non-WWW website setup, ,  and , and after having setup a correct redirection rule in .Htaccess to at least eliminate duplicate contents (currently the non-www solution (e.g. http://example.com) I have a feeling that my site rank less since I changed this.   My confusion was strengthened by these two opponents:     &amp;     Could the change of www.example.com >> http://example.com have a factual impact on ranking?  say either is better or worse. Are they holding information back?  I am confused fellow folks...  As much as I would like to separate facts from fiction, I am aware that not all the good valid information is written. Not on google webmaster site and perhaps not elsewhere. If so it seems out of date!  Does or does not a WWW domain impact SEO/rank better than its NON-WWW version? (Given that you have setup a proper redirect to avoid duplicates and go with one)
99359
I'm coding a small CMS to get a better understanding of how they work and to learn some new things about PHP. I have however come across a problem.  I want to use mod_rewrite (though if someone has a better solution I'm up for trying it) to produce nice clean URLs, so site.com/index.php?page=2 can instead be site.com/tools  By my understanding I need to alter my .htaccess file each time I add a new page and this is where I strike a problem, my PHP keeps telling me that I can't update it because it hasn't the permissions. A quick bit of chmod reveals that even with 777 permissions it can't do it, am I missing something?  My source for mod_rewrite instructions is currently  incase it is important/useful.
110634
I'm trying to move an existing Bedrock based multisite instance to nginx and am having difficulty getting a set of nginx rules to mimic the original .htaccess. Bedrock places the crux of the files in a wp/ subdirectory, but the urls still need to be accessible from the root domain.  The .htaccess is here as follows:  RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L]  # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L]  RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) wp/$1 [L] RewriteRule ^(.*\.php)$ wp/$1 [L] RewriteRule . index.php [L]   I need these at least as nginx conf rules or preferably nginx vhost rules.
84513
I use a cookieless sub domain static.example.com to serve all images, js, and css files. This static sub domain has as its root directory the same directory as the parent http://example.com. So static.example.com/index.php will result in calling the same file as http://example.com/index.php  Google has taken up indexing static.example.com and I need to stop this.  I can't modify robots.txt since it would apply to both domains. Webmaster tools allows "temporary" removal of a link, but this needs to be permanent.  I registered this static domain through google as a separate site from example.com, but this doesn't seem to buy me anything since I can't see a way to block crawling without using robots.txt - which would block it from the parent domain.  Any other ideas?  UPDATE  Found this conversation on   I am looking into whether it's possible to insert a META tag dynamically into the header of every page called on the static domain using php  CLARIFICATION  I am not putting any content on static.domain.com. There are NO webpages on it that are called - it only serves images. I have it redirecting to the same root directory as the main site for ease of coding image links (not every image is fed from the same image path).  Google got a hold of the static web root address - probably because .htaccess redirects to index.php if a file is missing and then crawled it. Now Google is showing the static version of the same pages with search results.
35370
I have a PHP application (Wordpress) in the root folder of my site, and all requests to the site run through it happily.   However, I have a subfolder, _links, which I would like to use to execute another, different php script.  Eg, if a user goes to site.com/_links/221312, then the index.php script from /_links takes over.  I formerly used a .htaccess file to achieve this, but since moving to nginx I can't make it work.   Here is the old .htaccess file.  RewriteEngine On RewriteRule    ^([0-9]+)/?$    index.php?linkid=$1    [NC,L]   Obviously, I'm passing the last bit of the URL to the script as a parameter.  Here is my nginx config. Requests to eg site.com/_links/23423 are picked up by if (!-e $request_filename) and rewritten to /index.php?q=/_links/23423 instead of being picked up by the location block.   server {         listen  127.0.0.1:8080;         server_name site.com www.site.com m.site.com;          root /var/www/site;         location ^~ /_links/ {                 add_header location 1;                 root /var/www/site/_links;                 rewrite "^([0-9]+)/?$" /index.php?linkid=$1 break;                 location ~ \.php$ {                         try_files $uri =404;                         fastcgi_pass unix:/var/run/php5-fpm.sock;                         fastcgi_index index.php;                         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                         include fastcgi_params;                  }          }         index index.php index.html;         if (!-e $request_filename)             {                 rewrite ^(.+)$ /index.php?q=$1 last;             }         location / {                 try_files $uri $uri/ =404;         }          # pass the PHP scripts to FastCGI server listening on the php-fpm socket         location ~ \.php$ {                 try_files $uri =404;                 fastcgi_pass unix:/var/run/php5-fpm.sock;                 fastcgi_index index.php;                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                 include fastcgi_params;          }         access_log /var/log/nginx/site.com.access.log;         error_log /var/log/nginx/site.com.error.log notice; }   I'm really confused. What's going on here?
43726
I've been trying to optimize my site as much as possible. One thing I can't figure out is reducing first byte time as WebPagetest gives me an "F". Does anyone have any tips for this? My site domain is registered through GoDaddy and hosted on GitHub pages.
66283
My code doesn't work with second level tld's like domain.co.uk Here is my conf:   # add www.   if ($host ~ ^(?!www)) {    rewrite ^/(.*)$ http://www.$host/$1 permanent;   }    # remove subdomain   if ($host ~ &quot;^www\.(.*)\.(.*\.([a-z]{2,4}|[a-z]{2}\.[a-z]{2}))&quot;) {    set $host_without_sub $2;    rewrite ^/(.*)$ http://www.$host_without_sub/$1 permanent;   }
63190
I have changed my website from HTTP to HTTPS.  At this moment, I have the next rewrite rule working to redirect calls for HTTP to HTTPS:  RewriteEngine On  RewriteCond %{SERVER_PORT} 80  RewriteRule ^(.*)$ https://example.net/$1 [R,L]    Should I write the URLs on the sitemap with HTTP or with HTTPS? (including the homepage)
73312
I have a static IP and hosted my site in this.Working fine. But I want to change the URL name (static IP) to a domain name. I have one domain name already registered.  I have http://xx.xx.xx.xx/ but I want to use something like http://www.mydomain.com  How can I achieve this?
35033
As per Yahoo's much-ballyhooed , we serve up static content from a CDN using far-future cache expiration headers. Of course, we need to occasionally update these "static" files, so we currently add an infix version as part of the filename (based on the SHA1 sum of the file contents). Thus:  styles.min.css   Becomes:  styles.min.abcd1234.css   However, managing the versioned files can become tedious, and I was wondering if a GET argument notation might be cleaner and better:  styles.min.css?v=abcd1234   Which do you use, and why? Are there browser- or proxy/cache-related considerations that I should consider?
122510
I have found a  very similar to this, which I thought would solve my problem.   However, after changing my .htaccess file, with index.php on the end of the list, and then index.php as the only entry, I still cannot get index.php to display.  Every other page works fine, but I don't know how to fix this.  Thanks.
69356
Maybe I'm making this way more complicated than I need to, but I want to serve my Drupal site that I've installed at example.com/drupal from example.com.  This particular site is an add-on site on my shared host, so the actual file structure is public_html/example.com/drupal.  What do I need to modify: .htaccess or add a redirect in cPanel?  I can't imagine I'm doing anything radical here, but there's no clear-cut answer in all my searching.
20904
Here's something interesting I noticed today - it is not possible to name a post a number - no matter what theme you use, and even if you name a post a long number that has no tag or post-name or category name conflicts, you will still get 2015 or 1826628 renamed as 2015-2 or 1826628-2.  I assume this isn't a bug, but I also don't see why you can't have mysite.com/20 or similar as a permalink to a post, when you have it named "20", and permalinks are set to postname.
50110
So, this is the URL:  http://code.google.com/p/es-lab/wiki/Talks#Changes_to_ECMAScript,_Part_2:_Harmony_Highlights_-_proxies_and   When I insert the URL like so:  [Title](URL)   the last part of the URL changes from  Highlights_-_proxies_and   to   Highlights/i-_proxies_and   What's going on here?  Note: See my comment below for a live demonstration of the issue! Feel free to copy the URL and try it for yourself... (It seems that the URL is only altered if the []() notation appears within a comment, but not when it appears within a question/answer.)